summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-14 11:27:56 +0200
committerDanilo M. <danix@danix.xyz>2026-08-14 11:27:56 +0200
commit46bdfeb27a072a44ce05affb0ccc3ca9c330197d (patch)
tree5247380549647904e6ce245830566f51516daa72 /src/mainwindow.h
parent80d78727bf9a73f609e6456fd114951b6daf347b (diff)
downloadqtmaildir-46bdfeb27a072a44ce05affb0ccc3ca9c330197d.tar.gz
qtmaildir-46bdfeb27a072a44ce05affb0ccc3ca9c330197d.zip
feat(rules): seed the rules dialog even when it is open
The dialog is non-modal and single-instance, so a second Create tagging rule reaches one that is already up. Seeding it beats dropping the request, which would read as a broken menu item. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 6e8501a..a68fcd9 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -34,6 +34,9 @@
// Included rather than forward-declared: SyncPhaseTracker is held by value, so
// its size must be known here. MailSync itself stays a forward declaration.
#include "mailsync.h"
+// Complete type, not a forward declaration: showTagRulesDialog() defaults its
+// seed to TagRule().
+#include "tagrules.h"
#include "syncmonitor.h"
#include "tagcolors.h"
#include "types.h"
@@ -376,7 +379,9 @@ private slots:
void onRulePreviewRequested(const QString &query);
/// Opens the auto-tagging rules editor, or raises the one already open.
- void showTagRulesDialog();
+ /// `seed` is an optional rule to open on, used by Create tagging rule on a
+ /// saved query. A default-constructed TagRule (empty query) means none.
+ void showTagRulesDialog(const TagRule &seed = TagRule());
/// Message counts for the rules dialog's queries, in the order it asked
/// for them. Does nothing if the dialog has since closed, or if a newer