aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-20 18:38:13 +0200
committerDanilo M. <danix@danix.xyz>2026-08-20 18:38:13 +0200
commit90cf14b0b23218f0ca01a280998e855a00b47567 (patch)
tree711317cb11f9c3b56637a2aa02e7438950950dc0 /src/types.h
parentff76a8fc6c050de121a277faa1937eeec9ac4641 (diff)
downloadqtmaildir-90cf14b0b23218f0ca01a280998e855a00b47567.tar.gz
qtmaildir-90cf14b0b23218f0ca01a280998e855a00b47567.zip
fix(config): reject garbage numerics instead of silently reading zero, item 123
toInt() and toLongLong() return 0 on failure rather than the default, so a typo in autosave_interval_ms produced a zero-interval timer. That timer is restarted on every keystroke, so it would fire on the next event-loop pass and turn a 30 second debounce into a Maildir write per keystroke, each one uploaded by mbsync: exactly the behaviour the debounce exists to prevent. This file already had the right shape in five places, a checked parse that reports the bad value and keeps the default. The [compose] keys were the only numerics skipping it. The interval is also clamped, since nothing assigns a meaning to a zero or negative autosave. quote_position now warns on an unrecognised value, matching sync_on_exit, language and date_format; the only silent fallbacks in this file are for absent keys rather than malformed ones. And a missing `sent` folder is a notice rather than a problem, because the spec blesses that configuration and a modal on every launch for a permanently correct setup is how users learn to dismiss dialogs unread. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015muoUo2GdxmBDSp5vjYcbE
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types.h b/src/types.h
index 0c6532e..99c271d 100644
--- a/src/types.h
+++ b/src/types.h
@@ -249,7 +249,7 @@ struct ComposeContext
{
enum class Kind { New, Reply, ReplyAll, Forward };
- QString accountKey; ///< Which account sends. Resolved by ComposeContext's rules.
+ QString accountKey; ///< Which account sends. Plain data here; the resolution rules live with whatever builds this context.
Kind kind = Kind::New;
QString originalPath; ///< The .eml being replied to or forwarded. Empty for New.
QString inReplyTo; ///< Message-ID of the original.