diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 21:11:30 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-04 12:54:23 +0200 |
| commit | fc3073f452e28733c3910ceda403531b3e17404d (patch) | |
| tree | 9abc7cebce905b2b6e5c7639f7c7fb0bf2659a11 /src/querycompleter.h | |
| parent | 1e587846a255592e5aab022c4e6e134d4ff64ed2 (diff) | |
| download | qtmaildir-fc3073f452e28733c3910ceda403531b3e17404d.tar.gz qtmaildir-fc3073f452e28733c3910ceda403531b3e17404d.zip | |
feat(completion): wire query completion into the main window
Adds the complete_query action, whose registration the assertion in
registerActions() has been demanding since keymap gained the name: a
known action nothing implements would have been a silently dead binding.
Also lands the QueryCompleter half of the manual trigger, which the
keymap commit left behind: triggerCompletion() and the focus-in filter
gated on completion_on_focus.
Tags refresh at startup, after a sync, and after a mutation introduces a
tag not already known, since that is the tag most likely to be typed
again. onAllTagsReady deliberately drops the generation the signal
carries: a tag list is not an ordered query result, so a later one is
always at least as good as an earlier one and discarding on staleness
could only throw away a good list.
Diffstat (limited to 'src/querycompleter.h')
| -rw-r--r-- | src/querycompleter.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/querycompleter.h b/src/querycompleter.h index 374fe84..61b2555 100644 --- a/src/querycompleter.h +++ b/src/querycompleter.h @@ -110,6 +110,14 @@ public: /// synthetic key events instead would test the keyboard layout, not this. void acceptCompletion(const QString &value); +public slots: + /// Opens the popup regardless of what has been typed. Bound to + /// complete_query, and the only trigger when completion_on_focus is off. + void triggerCompletion(); + +protected: + bool eventFilter(QObject *watched, QEvent *event) override; + private: QList<CompletionEntry> entriesFor(const CompletionContext &context) const; void rebuildModel(const CompletionContext &context); |
