diff options
Diffstat (limited to 'tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp')
-rw-r--r-- | tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp index f7ce339854..19386d342c 100644 --- a/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp +++ b/tests/auto/widgets/itemviews/qitemselectionmodel/tst_qitemselectionmodel.cpp @@ -2675,6 +2675,12 @@ public: using QItemSelectionModel::select; + void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) + { + QItemSelectionModel::setCurrentIndex(index, command); + m_target->setCurrentIndex(index, command); + } + private: QItemSelectionModel *m_target; @@ -2708,6 +2714,9 @@ void tst_QItemSelectionModel::testChainedSelectionClear() QVERIFY(selectedIndexes.size() == 0); } + duplicate.setCurrentIndex(model.index(0, 0), QItemSelectionModel::NoUpdate); + + QVERIFY(selectionModel.currentIndex() == duplicate.currentIndex()); } QTEST_MAIN(tst_QItemSelectionModel) |