diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-17 13:49:23 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-17 13:49:23 +0200 |
| commit | 46cdd10e9407dfc605ddc29425c9dac99e47d011 (patch) | |
| tree | ebf7f397e12c4c8f360b2506db3697556993eeb3 /src/searchterm.cpp | |
| parent | 435a41c8476a4e94f28ad7730351498465194454 (diff) | |
| download | qtmaildir-46cdd10e9407dfc605ddc29425c9dac99e47d011.tar.gz qtmaildir-46cdd10e9407dfc605ddc29425c9dac99e47d011.zip | |
feat(rules): show each rule's note in the rule list
The `note` field explains why a rule is shaped the way it is, and it was
reachable only by selecting the rule and reading the editor form, which is the
wrong way round for the one field that says what a rule is for.
Note is the LAST column, after Matches, at the user's request: a note is prose
and the widest thing in the table, so it belongs where it can run on without
pushing the narrow columns off screen. That is fiddlier than it looks, because
"Matches" is not in the Column enum at all: it is appended past the end at
index ColumnCount. Note therefore has to be declared before ColumnCount and
still draw after it, and setColumnCount takes a new ColumnTotal rather than
ColumnCount + 1. Both columns hold text, so a mix-up puts the counts under
Note and looks entirely plausible; the test asserts the counts land under
Matches as well as asserting the header order, since the header assertion
alone passes with the two swapped.
The cell is simplified(), because a note is free text and a newline truncates
a tree row at it. The full text is the cell's tooltip and is untouched in the
editor.
Also fixes a defect found on the way, which is not in the backlog entry.
QHeaderView::restoreState REFUSES a state saved with a different column count,
returning false and leaving the header untouched, which is what every existing
uistate.conf now does. The restore path set m_columnsSized and
m_countColumnSized regardless, spending the one auto-size each column gets on
a restore that did nothing: the new Note column would have opened at its
default width, once, permanently. Now guarded on the return value. Upgrading
costs one reset of this dialog's column widths, which is unavoidable, since
the saved state genuinely describes a table that no longer exists.
Backlog item 102.
Diffstat (limited to 'src/searchterm.cpp')
0 files changed, 0 insertions, 0 deletions
