diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-08 10:20:14 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-10 08:23:04 +0200 |
| commit | 2dd35b2327975a16e81018f8cd704c32a1e68cf5 (patch) | |
| tree | 93e8bf37002eeeebe85451ec26c8983bdacf2b13 /tests/test_tagdialog.cpp | |
| parent | c49d1317f95e435e5b5af0d0352e6743a5d57025 (diff) | |
| download | qtmaildir-2dd35b2327975a16e81018f8cd704c32a1e68cf5.tar.gz qtmaildir-2dd35b2327975a16e81018f8cd704c32a1e68cf5.zip | |
refactor(model): convert ThreadListModel to QAbstractItemModel
A table cannot indent or expand, so message rows need a tree. This task changes
only the base class and the index plumbing: no children are produced yet, so the
30 pre-existing tests in test_threadlistmodel are the regression net proving a
thread row still behaves exactly as it did, and QAbstractItemModelTester checks
the index/parent round trip a hand-written assertion would miss.
Two things the table version could leave wrong and a tree cannot. columnCount
returned 0 for a valid parent, which would give message rows no columns and
render them blank. And rowCount now answers only for column 0, since a tree
takes one set of children per row and offering them under every column draws an
expander in each.
The model stays two levels deep even though replies carry a reply depth of their
own. The visual nesting past the first level comes from that depth, not from
further parent-child structure, so no index calculation has to recurse.
Diffstat (limited to 'tests/test_tagdialog.cpp')
0 files changed, 0 insertions, 0 deletions
