aboutsummaryrefslogtreecommitdiffstats
path: root/src/messageview.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-14 18:01:28 +0200
committerDanilo M. <danix@danix.xyz>2026-08-14 18:01:28 +0200
commit78b3a9c1769d37ff7344360b6fed66b12b2f0649 (patch)
treeacc2f6f4c995f2c378e82a83f5800a9f3d6e6b48 /src/messageview.h
parentf7fa8bb6aefa5896fc7fdfb694f2a2752eb88ed5 (diff)
downloadqtmaildir-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/messageview.h')
-rw-r--r--src/messageview.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/messageview.h b/src/messageview.h
index 3e600f0..877064e 100644
--- a/src/messageview.h
+++ b/src/messageview.h
@@ -182,15 +182,16 @@ signals:
/// The user chose a search from one of the pane's context menus.
///
- /// `extend` narrows the current query rather than replacing it. The view
- /// does not know what the query bar holds and must not: the window owns
- /// that field and does the combining.
+ /// `mode` says whether to replace the query bar, narrow it, or narrow it
+ /// by everything that is not this value. The view does not know what the
+ /// query bar holds and must not: the window owns that field and does the
+ /// combining.
///
/// Separate from queryRequested(), which carries a gate against a link in
/// a rendered document driving the thread list. These menus are chrome
/// built by our own code from values we extracted, so they need no gate,
/// and widening the existing signal would change what that gate protects.
- void searchRequested(const QString &query, bool extend);
+ void searchRequested(const QString &query, SearchTerm::SearchMode mode);
protected:
/// Turns Ctrl+wheel over the body into zoom, and Ctrl+middle-click into a