diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-14 17:59:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-14 17:59:08 +0200 |
| commit | f7fa8bb6aefa5896fc7fdfb694f2a2752eb88ed5 (patch) | |
| tree | c9ea06ce6902811ebb0102b46808d3b1cd0335f4 /src | |
| parent | 7781f437a05b4e860353c012cb2f31860fd48cf6 (diff) | |
| download | qtmaildir-f7fa8bb6aefa5896fc7fdfb694f2a2752eb88ed5.tar.gz qtmaildir-f7fa8bb6aefa5896fc7fdfb694f2a2752eb88ed5.zip | |
refactor(search): add SearchMode, the type replacing bool extend
Introduced alone, ahead of the four signatures that change to it, so
that change lands as one mechanical commit with no behaviour difference.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/searchterm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/searchterm.h b/src/searchterm.h index 646fd77..3a0cac2 100644 --- a/src/searchterm.h +++ b/src/searchterm.h @@ -40,6 +40,22 @@ namespace SearchTerm { /// able to read. inline constexpr int kMaxValueLength = 200; +/// Which of the three search operations a menu entry asked for. +/// +/// Replaces the `bool extend` that carried two operations and had no room for +/// a third. A plain enum class, deliberately NOT registered as a metatype: +/// every connection carrying it is direct, within the UI thread. The `Q_ENUM` +/// trap recorded in CLAUDE.md belongs to the queued signals into +/// NotmuchWorker and does not apply here. +enum class SearchMode { + /// Replace the query bar outright. + Replace, + /// Narrow what is already there, via extend(). + Narrow, + /// Narrow by everything that is not this value, via exclude(). + Exclude, +}; + /// Quotes an arbitrary value for use as a notmuch term. /// /// Whitespace and newlines collapse to single spaces, embedded quotes are |
