diff options
author | Luca Beldi <v.ronin@yahoo.it> | 2021-04-23 15:35:29 +0100 |
---|---|---|
committer | Luca Beldi <v.ronin@yahoo.it> | 2021-04-26 13:44:51 +0100 |
commit | fcea8e7aa8a65de9e80136c2d603478831b246d0 (patch) | |
tree | 5ccef0ad2ecb0486b4d6655f8aaeb064242d271a /tests/auto/testlib | |
parent | 3f98ff474f24604c79a2fcc645697ca30fc444de (diff) |
Fix QAbstractItemModelTester false positive
When inserting rows to a branch with no columns
the tester should not complain about indexes being invalid
Pick-to: 6.1 6.0 5.15
Change-Id: I466f4e5140b10f6dcf65a71f109c2d3be7336507
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r-- | tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp index 5cbdd7beae..e8f8d0c390 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp +++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp @@ -116,6 +116,10 @@ void tst_QAbstractItemModelTester::standardItemModelZeroColumns() // QTBUG-92886 model.insertRows(0, 5); model.removeRows(1, 2); + + const QModelIndex parentIndex = model.index(0, 0); + model.insertRows(0, 5, parentIndex); + model.removeRows(1, 2, parentIndex); } void tst_QAbstractItemModelTester::testInsertThroughProxy() |