diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-03 13:27:13 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-03 13:27:13 +0100 |
commit | f2244103ff7a9b61fc7bcb7e920d8cc6b2f5f226 (patch) | |
tree | 8fe753743c46d4a652f582a7a2a49e5709eaa6e0 /tests/auto/quick/qquickpathview | |
parent | 57430b2bdad32150e0ed8ceb6893430363ee6670 (diff) | |
parent | 164af37710e5721cbc7d79a0af20f2387181c59c (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
tools/qmlprofiler/qmlprofilerclient.cpp
Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index eed947bfcd..fc5dd3bbca 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -1113,6 +1113,15 @@ void tst_QQuickPathView::setCurrentIndex() QCOMPARE(pathview->currentItem(), firstItem); QCOMPARE(firstItem->property("onPath"), QVariant(true)); + // check for bogus currentIndexChanged() signals + QSignalSpy currentIndexSpy(pathview, SIGNAL(currentIndexChanged())); + QVERIFY(currentIndexSpy.isValid()); + pathview->setHighlightMoveDuration(100); + pathview->setHighlightRangeMode(QQuickPathView::StrictlyEnforceRange); + pathview->setSnapMode(QQuickPathView::SnapToItem); + pathview->setCurrentIndex(3); + QTRY_COMPARE(pathview->currentIndex(), 3); + QCOMPARE(currentIndexSpy.count(), 1); } void tst_QQuickPathView::resetModel() |