diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-13 11:43:16 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-13 11:43:16 +0200 |
| commit | 8913a1190c48ff2672f8783af8594ca11e49ccf7 (patch) | |
| tree | 26e04310efbc3bda7e3988f1fc9c3e7e470537c1 /src/messageview.h | |
| parent | 2ad9b17d53e19418de089cc98820af0776c3bfba (diff) | |
| download | qtmaildir-8913a1190c48ff2672f8783af8594ca11e49ccf7.tar.gz qtmaildir-8913a1190c48ff2672f8783af8594ca11e49ccf7.zip | |
feat(rules): report the text-mode refusal without a modal
Leaving text mode with a query the builder cannot represent has to
refuse, since there are no rows that mean that query. It announced this
with a QMessageBox, which made the branch untestable: a modal blocks the
test that reaches it, so the one path that can strand a user was the one
path shipping unverified.
Say it in the warning label the dialog already has instead. That also
suits the moment better, since it does not interrupt someone mid-edit to
tell them something the label can hold while they keep typing, and it
matches how the tag dialog reports a bad tag.
Returning to the rows now calls showWarnings(), because the refusal
writes into the same label the load warnings use and a stale complaint
would otherwise outlive the query that caused it.
The test drives the refusal and the recovery, and asserts the warning
appears and then clears. Verified by mutation: letting the checkbox clear
regardless fails it.
warningTextForTest uses isVisibleTo rather than isVisible. Every child of
a dialog that was never shown reports isVisible() false, so the seam
would have reported no warning whatever the label held, which is a probe
that cannot see the thing it checks.
Diffstat (limited to 'src/messageview.h')
0 files changed, 0 insertions, 0 deletions
