diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-10 08:25:24 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-10 08:25:24 +0200 |
| commit | 1335d3c7f891a22f61307d2d186483f56e8e558c (patch) | |
| tree | 0d4cdc12668a8c1c813f8c6770540acbf71d75bc /tests/test_mainwindow.cpp | |
| parent | dbca3a604470dbd500f02325dd6a0501ca008ec3 (diff) | |
| download | qtmaildir-1335d3c7f891a22f61307d2d186483f56e8e558c.tar.gz qtmaildir-1335d3c7f891a22f61307d2d186483f56e8e558c.zip | |
test(mainwindow): select the flagged-tag row through the tree helper
theImportantActionStillWritesTheFlaggedTag arrived from master, where the
thread list is a QTableView, onto a branch where item 20 made it a
QTreeView. findChild<QTableView*> returned null and the test failed on its
first QVERIFY, before reaching anything it was written to check.
Uses the branch's selectThreadRow helper, which is what every other test
here already calls: QTreeView has no selectRow of its own.
Diffstat (limited to 'tests/test_mainwindow.cpp')
| -rw-r--r-- | tests/test_mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp index 0a916c4..740e7fa 100644 --- a/tests/test_mainwindow.cpp +++ b/tests/test_mainwindow.cpp @@ -3335,7 +3335,7 @@ void TestMainWindow::theImportantActionStillWritesTheFlaggedTag() auto *model = window.findChild<ThreadListModel *>(); QVERIFY(model); - auto *view = window.findChild<QTableView *>(); + auto *view = window.findChild<QTreeView *>(); QVERIFY(view); model->appendBatch({ makeThread(QStringLiteral("t1"), @@ -3345,7 +3345,7 @@ void TestMainWindow::theImportantActionStillWritesTheFlaggedTag() // below would pass against an action that did nothing at all. QVERIFY(!model->threadAt(0).isFlagged()); - view->selectRow(0); + selectThreadRow(view, 0); auto *action = window.findChild<QAction *>(QStringLiteral("flag")); QVERIFY(action); |
