diff options
-rw-r--r-- | tests/auto/quick/qquickpathview/data/datamodel.qml | 1 | ||||
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/quick/qquickpathview/data/datamodel.qml b/tests/auto/quick/qquickpathview/data/datamodel.qml index 44f2aecc0a..4b858e233f 100644 --- a/tests/auto/quick/qquickpathview/data/datamodel.qml +++ b/tests/auto/quick/qquickpathview/data/datamodel.qml @@ -6,6 +6,7 @@ PathView { objectName: "pathview" width: 240; height: 320 pathItemCount: testObject.pathItemCount + highlightMoveDuration: 0 function checkProperties() { testObject.error = false; diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index 7235faaff7..579cb954aa 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -819,18 +819,16 @@ void tst_QQuickPathView::dataModel() QVERIFY(testItem == 0); pathview->setCurrentIndex(1); - QTRY_COMPARE(pathview->currentItem(), findItem<QQuickItem>(pathview, "wrapper", 1)); - QTest::qWait(100); + QCOMPARE(pathview->currentIndex(), 1); + QCOMPARE(pathview->currentItem(), findItem<QQuickItem>(pathview, "wrapper", 1)); model.insertItem(2, "pink", "2"); - QTest::qWait(100); QTRY_COMPARE(findItems<QQuickItem>(pathview, "wrapper").count(), 5); QCOMPARE(pathview->currentIndex(), 1); QCOMPARE(pathview->currentItem(), findItem<QQuickItem>(pathview, "wrapper", 1)); - text = findItem<QQuickText>(pathview, "myText", 2); - QVERIFY(text); + QTRY_VERIFY(text = findItem<QQuickText>(pathview, "myText", 2)); QCOMPARE(text->text(), model.name(2)); model.removeItem(3); |