diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-17 19:58:51 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-17 19:58:51 +0200 |
| commit | d5e9ec157946635294001b57ce8353a109ec5051 (patch) | |
| tree | 74a2f72973d1535d684b76cb24d4bc3118bb35a3 /src/mainwindow.cpp | |
| parent | 9899b9af523ad2aef55300c9132d21a687a0a19d (diff) | |
| download | qtmaildir-d5e9ec157946635294001b57ce8353a109ec5051.tar.gz qtmaildir-d5e9ec157946635294001b57ce8353a109ec5051.zip | |
feat(config): add the trash query generator
Adds trash as a fifth built-in query filter beside Unread, Inbox,
Important and Sent, composing per-account exactly as Sent does:
Config::resolvedQuery() asks each account for its own trashQuery()
rather than wrapping the all-accounts union, and an account with no
trash folder resolves to matchNothingQuery() rather than "match
everything".
Also gives the Trash button a toolbar icon (user-trash) and a trash
key to the mainwindow fixture that asserts every filter button carries
one; without it the button is skipped from the row entirely (no
account configured a trash folder), and the existing icon test found
no button to check.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 594535b..67d3ee4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1893,6 +1893,7 @@ void MainWindow::buildSavedQueryRow(QWidget *parent, QVBoxLayout *layout) { QStringLiteral("inbox"), QStringLiteral("mail-inbox") }, { QStringLiteral("flagged"), QStringLiteral("starred") }, { QStringLiteral("sent"), QStringLiteral("mail-folder-sent") }, + { QStringLiteral("trash"), QStringLiteral("user-trash") }, }; button->setIcon( QIcon::fromTheme(filterIcons.value(filter.generated))); |
