diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 15:37:52 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 15:37:52 +0200 |
| commit | 06586027b0f328ba0aa4b2c6c3c77471d72aac52 (patch) | |
| tree | c18d68bee7edb7d48e13fe31869d7894cfb72f6c /src/querycompleter.h | |
| parent | 9d4fb5444438bdf188a6149a6667788dc3fc7bc0 (diff) | |
| download | qtmaildir-06586027b0f328ba0aa4b2c6c3c77471d72aac52.tar.gz qtmaildir-06586027b0f328ba0aa4b2c6c3c77471d72aac52.zip | |
feat: complete contacts in the query bar
from: and to: now offer the vCard store's addresses, each quoted via
SearchTerm::quote() with the contact's name as the description. The store
is the enumerator libnotmuch does not expose, which is what the old
complete-nothing comment said was missing; it keeps that role for folder:,
subject:, attachment:, thread: and id:.
With no store configured the branch returns {} and the behaviour is
unchanged.
Diffstat (limited to 'src/querycompleter.h')
| -rw-r--r-- | src/querycompleter.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/querycompleter.h b/src/querycompleter.h index 27161bc..147909c 100644 --- a/src/querycompleter.h +++ b/src/querycompleter.h @@ -24,6 +24,7 @@ #include <QStringList> #include "completionentry.h" +#include "contactstore.h" class Config; class QCompleter; @@ -98,6 +99,11 @@ public: /// Replaces the tag candidates. Called with the worker's allTagsReady. void setTags(const QStringList &tags); + /// Replaces the address candidates. Called by MainWindow after the vCard + /// store is read, and REPLACES rather than merges for the same reason + /// setTags does: the caller owns the list. + void setContacts(const QList<Contact> &contacts); + /// The candidate values for a context, in the order they are offered. QStringList candidatesFor(const CompletionContext &context) const; @@ -134,6 +140,7 @@ private: QLineEdit *m_edit = nullptr; const Config &m_config; QStringList m_tags; + QList<Contact> m_contacts; /// Set while the filter is redelivering a key to the popup. The filter is /// installed on the application and sendEvent re-runs application filters, |
