aboutsummaryrefslogtreecommitdiffstats
path: root/src/messagedetailsdialog.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-14 18:02:38 +0200
committerDanilo M. <danix@danix.xyz>2026-08-14 18:02:38 +0200
commit612eb64871de7e00f21a9b7ebf33d8179caa16bc (patch)
treec92f928df38ae87fd233967301e01c6ef5b4dcd6 /src/messagedetailsdialog.h
parent78b3a9c1769d37ff7344360b6fed66b12b2f0649 (diff)
downloadqtmaildir-612eb64871de7e00f21a9b7ebf33d8179caa16bc.tar.gz
qtmaildir-612eb64871de7e00f21a9b7ebf33d8179caa16bc.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'src/messagedetailsdialog.h')
-rw-r--r--src/messagedetailsdialog.h6
1 files changed, 6 insertions, 0 deletions
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<ThreadRenderItem> &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<ThreadRenderItem> &items);
QList<HeaderRow> m_rows;
+ bool m_hasQuery = false;
};