diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-17 19:46:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-17 19:46:08 +0200 |
| commit | acec616bee1c7a336a9dcee8338849b970c3eab1 (patch) | |
| tree | ce76acee427818220c1c444d737587abc5c804d9 /src/config.h | |
| parent | 69e2173b71e94e5a89c39b20d4a5962aadb715e9 (diff) | |
| download | qtmaildir-acec616bee1c7a336a9dcee8338849b970c3eab1.tar.gz qtmaildir-acec616bee1c7a336a9dcee8338849b970c3eab1.zip | |
feat(config): read a per-account trash folder
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 70f7181..1feeeda 100644 --- a/src/config.h +++ b/src/config.h @@ -58,6 +58,15 @@ struct Account /// one for the account that has none. QString sent; + /// The account's trash folder, relative to maildir. + /// + /// MANDATORY, unlike `sent` and `drafts`. Delete moves a file into this + /// folder, so an account without one cannot delete at all, and the user + /// chose a config error over a per-account disabled state: "it is + /// mandatory for the program to function properly". Config::load() + /// reports a missing key through the warnings path. + QString trash; + /// Chip colour in the thread list. Invalid when unset, in which case one /// is generated from the account tag's name. QColor color; @@ -98,6 +107,13 @@ struct Account /// keys are independent, and one real account configures `drafts` with no /// `sent` at all. QString draftsQuery() const; + + /// Matches this account's trash, or empty when `trash` is unset. + /// + /// Empty is a config error rather than a legitimate state, unlike + /// sentQuery(). The query helper still returns empty so callers compose + /// uniformly; it is Config::load() that reports the problem. + QString trashQuery() const; }; /// A named query, stored in queries.json. |
