diff options
Diffstat (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index 44da9a64e5..d6c1fd6eea 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -91,6 +91,7 @@ private slots: void stopAtBounds_data(); void nestedMouseAreaUsingTouch(); void pressDelayWithLoader(); + void movementFromProgrammaticFlick(); void cleanup(); private: @@ -1719,6 +1720,25 @@ void tst_qquickflickable::pressDelayWithLoader() QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150)); } +// QTBUG-34507 +void tst_qquickflickable::movementFromProgrammaticFlick() +{ + QScopedPointer<QQuickView> window(new QQuickView); + window->setSource(testFileUrl("movementSignals.qml")); + QTRY_COMPARE(window->status(), QQuickView::Ready); + QQuickViewTestUtil::centerOnScreen(window.data()); + QQuickViewTestUtil::moveMouseAway(window.data()); + window->show(); + QVERIFY(QTest::qWaitForWindowActive(window.data())); + + QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject()); + QVERIFY(flickable != 0); + + // verify that the signals for movement and flicking are called in the right order + flickable->flick(0, -1000); + QTRY_COMPARE(flickable->property("signalString").toString(), QString("msfsfeme")); +} + QTEST_MAIN(tst_qquickflickable) #include "tst_qquickflickable.moc" |