aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-11-22 09:28:40 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-22 03:32:42 +0100
commit8d8015f8d5912300d8c6a1f8bac298163cb566b1 (patch)
tree6f8c87886788caeab18ce2f67ef4913b943d32ba /tests/auto/declarative
parent88fefbc68ddcbe99e718a07c5f25e5d28c839439 (diff)
Move path with highlightMoveDuration: 0
Task-number: QTBUG-22786 Change-Id: I10043bfa5d8c622fc4e7a25bcb1f96ef43d23890 Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp b/tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp
index 5e434b0259..8b0ecc294f 100644
--- a/tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp
@@ -621,6 +621,19 @@ void tst_QQuickPathView::setCurrentIndex()
QCOMPARE(pathview->currentItem(), firstItem);
QCOMPARE(firstItem->property("onPath"), QVariant(true));
+ // move an item, set move duration to 0, and change currentIndex to moved item. QTBUG-22786
+ model.moveItem(0, 3);
+ pathview->setHighlightMoveDuration(0);
+ pathview->setCurrentIndex(3);
+ QCOMPARE(pathview->currentIndex(), 3);
+ firstItem = findItem<QQuickRectangle>(pathview, "wrapper", 3);
+ QVERIFY(firstItem);
+ QCOMPARE(pathview->currentItem(), firstItem);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+ model.moveItem(3, 0);
+ pathview->setCurrentIndex(0);
+ pathview->setHighlightMoveDuration(300);
+
// Check the current item is still created when outside the bounds of pathItemCount.
pathview->setPathItemCount(2);
pathview->setHighlightRangeMode(QQuickPathView::NoHighlightRange);