From ca7ac4f1751500042abc7ec93b47333ed97d5ffb Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 3 Jun 2015 15:01:23 +0200 Subject: 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 --- tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp') 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); -- cgit v1.2.3