summaryrefslogtreecommitdiffstats
path: root/src/config.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-17 19:46:08 +0200
committerDanilo M. <danix@danix.xyz>2026-08-17 19:46:08 +0200
commitacec616bee1c7a336a9dcee8338849b970c3eab1 (patch)
treece76acee427818220c1c444d737587abc5c804d9 /src/config.cpp
parent69e2173b71e94e5a89c39b20d4a5962aadb715e9 (diff)
downloadqtmaildir-acec616bee1c7a336a9dcee8338849b970c3eab1.tar.gz
qtmaildir-acec616bee1c7a336a9dcee8338849b970c3eab1.zip
feat(config): read a per-account trash folder
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 600c558..d56099a 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -137,6 +137,11 @@ QString Account::draftsQuery() const
return folderQuery(maildir, drafts);
}
+QString Account::trashQuery() const
+{
+ return folderQuery(maildir, trash);
+}
+
QString Config::allSentQuery() const
{
return joinAccountQueries(m_accounts, &Account::sentQuery);
@@ -433,6 +438,12 @@ void Config::load(const QString &path)
account.sent =
settings.value(QStringLiteral("sent")).toString().trimmed();
+ // Mandatory, unlike sent: Delete moves a file into this folder, so an
+ // account without one cannot delete at all. Trimmed for the same
+ // reason as sent, above.
+ account.trash =
+ settings.value(QStringLiteral("trash")).toString().trimmed();
+
// Both optional, and both describe this account's chip in the thread
// list. An account tag is a different taxonomy from a functional one,
// saying which mailbox a thread arrived in rather than what state it