diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-14 18:01:28 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-14 18:01:28 +0200 |
| commit | 78b3a9c1769d37ff7344360b6fed66b12b2f0649 (patch) | |
| tree | acc2f6f4c995f2c378e82a83f5800a9f3d6e6b48 /src/mainwindow.h | |
| parent | f7fa8bb6aefa5896fc7fdfb694f2a2752eb88ed5 (diff) | |
| download | qtmaildir-78b3a9c1769d37ff7344360b6fed66b12b2f0649.tar.gz qtmaildir-78b3a9c1769d37ff7344360b6fed66b12b2f0649.zip | |
refactor(search): carry SearchMode instead of bool extend
Four signatures, no behaviour change: the two shipped operations map to
Replace and Narrow. runSearchFromPane becomes a switch and gains the
Exclude arm, which nothing can reach until the menu entry exists.
Seven call sites across three test files moved with it, two more than
the plan predicted: test_messageview and test_mainwindow also drive
these signals directly.
mainwindow.h and messagedetailsdialog.h now include searchterm.h for
the type; messageview.h already did.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/mainwindow.h')
| -rw-r--r-- | src/mainwindow.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h index f54a889..b41f75d 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -34,6 +34,7 @@ // Included rather than forward-declared: SyncPhaseTracker is held by value, so // its size must be known here. MailSync itself stays a forward declaration. #include "mailsync.h" +#include "searchterm.h" // Complete type, not a forward declaration: showTagRulesDialog() defaults its // seed to TagRule(). #include "tagrules.h" @@ -375,10 +376,11 @@ private slots: /// Runs a search asked for from the message pane. /// - /// `extend` narrows the current query rather than replacing it. The panes - /// carry a finished query and no knowledge of the bar; the combining - /// happens here, because only the window can see what the bar holds. - void runSearchFromPane(const QString &query, bool extend); + /// `mode` says whether to replace the query bar, narrow it, or narrow it + /// by everything that is not this value. The panes carry a finished query + /// and no knowledge of the bar; the combining happens here, because only + /// the window can see what the bar holds. + void runSearchFromPane(const QString &query, SearchTerm::SearchMode mode); /// Runs one tagging rule's query in the thread list, so the user can see /// which mail it collects. The rules dialog stays open; the point is to |
