aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qquickcontrol/tst_qquickcontrol.cpp')
-rw-r--r--tests/auto/qquickcontrol/tst_qquickcontrol.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qquickcontrol/tst_qquickcontrol.cpp b/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
index c8d34756..df3b31c8 100644
--- a/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
+++ b/tests/auto/qquickcontrol/tst_qquickcontrol.cpp
@@ -98,9 +98,12 @@ void tst_QQuickControl::flickable()
QSignalSpy buttonClickedSpy(button, SIGNAL(clicked()));
QVERIFY(buttonClickedSpy.isValid());
- QTest::touchEvent(window, touchDevice.data()).press(0, QPoint(button->width() / 2, button->height() / 2));
+ QPoint p(button->width() / 2, button->height() / 2);
+ QTest::touchEvent(window, touchDevice.data()).press(0, p);
QTRY_COMPARE(buttonPressedSpy.count(), 1);
- QTest::touchEvent(window, touchDevice.data()).release(0, QPoint(button->width() / 2, button->height() / 2));
+ p += QPoint(1, 1); // less than the drag threshold
+ QTest::touchEvent(window, touchDevice.data()).move(0, p);
+ QTest::touchEvent(window, touchDevice.data()).release(0, p);
QTRY_COMPARE(buttonReleasedSpy.count(), 1);
QTRY_COMPARE(buttonClickedSpy.count(), 1);
}