diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-13 20:14:25 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-13 20:14:25 +0200 |
| commit | 9be1b13b91188cf44a40c6786a83de034988cdbd (patch) | |
| tree | 7e5339fbb7e71d29498405f9d4b1c4188f5ab4c3 /src/main.cpp | |
| parent | a7872cf56b7f313881f0d5e50d548ffdb5ba68b9 (diff) | |
| download | qtmaildir-9be1b13b91188cf44a40c6786a83de034988cdbd.tar.gz qtmaildir-9be1b13b91188cf44a40c6786a83de034988cdbd.zip | |
fix(queries): stop writing keys that carry no information
Saving a generated entry wrote `"query": ""` and `"flat": true` alongside its
generator. Both reload correctly, so nothing was broken, but queries.json is
meant to be hand-edited and each redundant key is one more thing to read past.
A generated entry has no query of its own, and the sent generator already
implies flat.
Written now only when they say something, which is the rule `pinned` and
`account` already followed: `query` is skipped for a generated entry in favour
of `generated`, and `flat` is skipped when the generator implies it.
Omitting `flat` is only safe because loadSavedQueries() reapplies it from the
generator, so the two are coupled: the mutation that stops reapplying it fails
this test and one other, in both suites. That is deliberate, since a round-trip
test can otherwise pass while quietly writing less than it reads.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/main.cpp')
0 files changed, 0 insertions, 0 deletions
