From de1f7dba196d59cdaa46d2938e5e40e40f97a692 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 14 Aug 2026 18:04:32 +0200 Subject: feat(search): offer Exclude from search in both menus Third entry in the message pane's submenus and in each details row, greyed rather than hidden when the query bar is empty, so the feature stays visible to someone exploring a fresh window. requestSearch refuses an Exclude with no query as well, so the guard does not rest on the menu's enabled state alone. Mutation checked: disabling that condition fails the new test on the blocked emit. Co-Authored-By: Claude Opus 5 --- src/messagedetailsdialog.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/messagedetailsdialog.h') diff --git a/src/messagedetailsdialog.h b/src/messagedetailsdialog.h index b62618a..186006f 100644 --- a/src/messagedetailsdialog.h +++ b/src/messagedetailsdialog.h @@ -75,6 +75,11 @@ public: /// The rows on display, in order. Exposed for testing without rendering. QList rows() const { return m_rows; } + /// Whether "Exclude from search" is offered. False with an empty query + /// bar: there would be nothing to exclude FROM. Exposed for testing + /// without popping a context menu. + bool canExcludeFromSearch() const { return m_hasQuery; } + /// 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. -- cgit v1.2.3