aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 472ffdc4b6..8e7f93849c 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -2718,9 +2718,12 @@ void tst_QQuickListView::currentIndex()
QTRY_COMPARE(listview->highlightItem()->y(), hlPos);
// insert item before currentIndex
+ window->rootObject()->setProperty("currentItemChangedCount", QVariant(0));
listview->setCurrentIndex(28);
+ QTRY_COMPARE(window->rootObject()->property("currentItemChangedCount").toInt(), 1);
model.insertItem(0, "Foo", "1111");
QTRY_COMPARE(window->rootObject()->property("current").toInt(), 29);
+ QCOMPARE(window->rootObject()->property("currentItemChangedCount").toInt(), 1);
// check removing highlight by setting currentIndex to -1;
listview->setCurrentIndex(-1);