aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflickable
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-03 15:01:23 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-05 05:51:28 +0000
commitca7ac4f1751500042abc7ec93b47333ed97d5ffb (patch)
tree1164328f9c4e1581e9e4a0e4e1b9cfcaef2837e8 /tests/auto/quick/qquickflickable
parentbfde65a8180e3dbf811e757f6d95f9554f622475 (diff)
Decouple flickable stopAtBounds test from mouse event timing
We don't really want to know if the flickable is still flicking at the end of the flick() call, but rather if it has been flicking at some point. Change-Id: Ib6c89023042b2a45e66f1825a699bb47dc6e13ee Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickflickable')
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index da5463a7a6..44da9a64e5 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -1651,12 +1651,14 @@ void tst_qquickflickable::stopAtBounds()
} else {
flickable->setContentX(invert ? 100 : 0);
}
+
+ QSignalSpy flickSignal(flickable, SIGNAL(flickingChanged()));
if (invert)
flick(&view, QPoint(20,20), QPoint(120,120), 100);
else
flick(&view, QPoint(120,120), QPoint(20,20), 100);
- QVERIFY(flickable->isFlicking());
+ QVERIFY(flickSignal.count() > 0);
if (transpose) {
if (invert)
QTRY_COMPARE(flickable->isAtYBeginning(), true);