diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 08:56:33 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-04 12:52:41 +0200 |
| commit | 11946725ae4fee988d9cea38359693d4ecb46470 (patch) | |
| tree | 8bf0f54a24e887e74acd9f2c800bde3c841579d4 /src/CMakeLists.txt | |
| parent | 23e2b007c76dbd1569b1f97c17100eefed4988af (diff) | |
| download | qtmaildir-11946725ae4fee988d9cea38359693d4ecb46470.tar.gz qtmaildir-11946725ae4fee988d9cea38359693d4ecb46470.zip | |
feat: add ThreadListModel with batch append
QAbstractTableModel over query results, appended in batches so a large
query paints its first screenful immediately. Tag changes apply locally
for optimistic UI; reverting a failed write means calling applyTagChange
again with added and removed swapped, which the round-trip test pins.
Two additions to the drafted version:
- A ThreadIdRole, so a view's QModelIndex maps back to the thread id the
worker speaks without every caller reaching around the model.
- data() checks its own row and column bounds. Qt will not hand out an
out-of-range index and invalidates persistent ones on reset, so this is
unreachable defence rather than a live path; the test says so instead of
pretending to cover it.
Verified by mutation that the empty-batch guard, the ThreadIdRole, and the
full-row dataChanged range each fail exactly one test when removed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5198429..5f01128 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,7 @@ add_library(qtmaildir_lib STATIC htmlbuilder.cpp cidschemehandler.cpp notmuchworker.cpp + threadlistmodel.cpp ) target_include_directories(qtmaildir_lib |
