aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-10 18:41:43 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-10 18:41:43 +0100
commitcc0eb9c2aa9032c6a7bf2ab05d1eb913a09fa4f1 (patch)
tree7314014389e227bd7c9b28d97eebcd072e4852a2 /tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
parentcb2ac154273a8c07a1e4a14246ae22f6e0deaeda (diff)
parent0a74dc69b4c57a15da90be29b598371dfa63f7ee (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/qml/jsruntime/qv4managed_p.h Change-Id: I5da7ae9c87a539e42292f272d9e2b5faab619c9f
Diffstat (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp')
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 794f9a8af6..86321c775e 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -412,6 +412,29 @@ void tst_qquickflickable::pressDelay()
QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150));
QCOMPARE(clickedSpy.count(),1);
+ // Press and release position should match
+ QCOMPARE(flickable->property("pressX").toReal(), flickable->property("releaseX").toReal());
+ QCOMPARE(flickable->property("pressY").toReal(), flickable->property("releaseY").toReal());
+
+
+ // Test a quick tap within the pressDelay timeout
+ clickedSpy.clear();
+ QTest::mousePress(window.data(), Qt::LeftButton, 0, QPoint(180, 180));
+
+ // The press should not occur immediately
+ QVERIFY(mouseArea->property("pressed").toBool() == false);
+
+ QCOMPARE(clickedSpy.count(),0);
+
+ // On release the press, release and clicked signal should be emitted
+ QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(180, 180));
+ QCOMPARE(clickedSpy.count(),1);
+
+ // Press and release position should match
+ QCOMPARE(flickable->property("pressX").toReal(), flickable->property("releaseX").toReal());
+ QCOMPARE(flickable->property("pressY").toReal(), flickable->property("releaseY").toReal());
+
+
// QTBUG-31168
QTest::mousePress(window.data(), Qt::LeftButton, 0, QPoint(150, 110));