From fc3073f452e28733c3910ceda403531b3e17404d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 21:11:30 +0200 Subject: 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. --- src/querycompleter.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/querycompleter.h') 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 entriesFor(const CompletionContext &context) const; void rebuildModel(const CompletionContext &context); -- cgit v1.2.3