From 612eb64871de7e00f21a9b7ebf33d8179caa16bc Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 14 Aug 2026 18:02:38 +0200 Subject: feat(search): push the query bar's emptiness into the panes The menus cannot read the query bar and must not. MainWindow already watched textChanged for the Save button; the same lambda now also tells MessageView, which passes it to the details dialog at construction, where it cannot go stale. Nothing consumes it yet. Co-Authored-By: Claude Opus 5 --- src/messagedetailsdialog.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/messagedetailsdialog.h') diff --git a/src/messagedetailsdialog.h b/src/messagedetailsdialog.h index b141c39..b62618a 100644 --- a/src/messagedetailsdialog.h +++ b/src/messagedetailsdialog.h @@ -64,7 +64,12 @@ class MessageDetailsDialog : public QDialog { Q_OBJECT public: + /// `hasQuery` says whether the query bar holds anything, which decides + /// whether "Exclude from search" is offered: there must be something to + /// exclude FROM. Taken at construction rather than set later, since the + /// dialog is built fresh per invocation and so cannot go stale. explicit MessageDetailsDialog(const QList &items, + bool hasQuery = false, QWidget *parent = nullptr); /// The rows on display, in order. Exposed for testing without rendering. @@ -86,4 +91,5 @@ private: void buildRows(const QList &items); QList m_rows; + bool m_hasQuery = false; }; -- cgit v1.2.3