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/messagedetailsdialog.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/messagedetailsdialog.h')
| -rw-r--r-- | src/messagedetailsdialog.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/messagedetailsdialog.h b/src/messagedetailsdialog.h index f865913..b141c39 100644 --- a/src/messagedetailsdialog.h +++ b/src/messagedetailsdialog.h @@ -23,6 +23,7 @@ #include <QString> #include "htmlbuilder.h" +#include "searchterm.h" /// One header of one message, as shown and as searched for. /// @@ -72,12 +73,13 @@ public: /// Emits searchRequested for `row`, or nothing when the row carries no /// searchable query. The menu entries call this; a test can too, without /// popping a menu. - void requestSearch(const HeaderRow &row, bool extend); + void requestSearch(const HeaderRow &row, SearchTerm::SearchMode mode); signals: - /// The user chose a search from a row's menu. `extend` narrows the current - /// query rather than replacing it. - void searchRequested(const QString &query, bool extend); + /// The user chose a search from a row's menu. `mode` says whether to + /// replace the query, narrow it, or narrow it by everything that is not + /// this value. + void searchRequested(const QString &query, SearchTerm::SearchMode mode); private: /// Builds the rows from the thread, one group per message. |
