Cockatrice/libcockatrice_models/libcockatrice/models/deck_list
BruebachL ce543896f5
[Tests] Use QtTest for model contracts and signal spies (#7630)
Qt6::Test was linked into every test but never used. Add a small RAII
QAbstractItemModelTester helper and apply it to the deck list model, the card
database model and display proxy, and the sets model. Add QSignalSpy coverage
for the card-added and download-settings signals, and assert explicitly that a
card row is a leaf with no child columns (the tester does not check that).

The contract checker immediately found four model bugs, fixed here:
- DeckListModel allowed children below non-zero columns.
- CardDatabaseModel reported every card as a child of every card row.
- CardDatabaseModel reported six columns for a valid (leaf) card index.
- CardDatabaseDisplayModel claimed more rows were fetchable while rowCount
  already exposed them all, so fetchMore() inserted duplicates.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:27:43 +01:00
..
CMakeLists.txt [Build] Configure AUTOMOC, AUTOUIC and AUTORCC once (#7637) 2026-11-02 07:06:47 +01:00
deck_list_model.cpp [Tests] Use QtTest for model contracts and signal spies (#7630) 2026-11-02 07:27:43 +01:00
deck_list_model.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
deck_list_model_custom_zones.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
deck_list_model_custom_zones.h [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
deck_list_sort_filter_proxy_model.cpp [Models] Use QCollator for natural, cached sorting (#7633) 2026-10-25 01:01:04 +02:00
deck_list_sort_filter_proxy_model.h [Models] Use QCollator for natural, cached sorting (#7633) 2026-10-25 01:01:04 +02:00