aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflickable
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-11 14:48:32 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-24 18:17:04 +0100
commit6933b7e8e6dc279a8eb34e1f4c60bc109dfb7d26 (patch)
tree79e41aa9c624708f8dfe52621a5c49f008bc51e4 /tests/auto/quick/qquickflickable
parentd4425318801c055127dba04792ebf4ef69643b6e (diff)
Ungrab mouse when FocusAboutToChange instead of Leave
Commit 7b2e2117162594a2d0234bb02408f5b5a446488b introduced a regression in mouse handling: When moving the mouse out of the window it would cancel all further mouse events. That is actually not wanted (eg scroll bars). Instead ungrab the mouse when the focus changes, that means the mouse handling with popups works and the scrollbar use case is also fixed. All the tests related to this seem quite timing sensitive, so try some more QTRY_VERIFY. Remove the parallel_test so that more cpu time will actually let the tests pass more reliably. Change-Id: I90586b05f461d3762728a466d71bcb967e03d14b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickflickable')
-rw-r--r--tests/auto/quick/qquickflickable/qquickflickable.pro1
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp10
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/auto/quick/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro
index 3ba752bf7d..95c703befe 100644
--- a/tests/auto/quick/qquickflickable/qquickflickable.pro
+++ b/tests/auto/quick/qquickflickable/qquickflickable.pro
@@ -9,6 +9,5 @@ include (../shared/util.pri)
TESTDATA = data/*
-CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private quick-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 662e86018c..784988b913 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -618,7 +618,7 @@ void tst_qquickflickable::movingAndFlicking()
window->setSource(testFileUrl("flickable03.qml"));
window->show();
window->requestActivate();
- QTest::qWaitForWindowActive(window);
+ QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -639,7 +639,7 @@ void tst_qquickflickable::movingAndFlicking()
// do a flick that keeps the view within the bounds
flick(window, flickFrom, flickToWithoutSnapBack, 200);
- QVERIFY(flickable->isMoving());
+ QTRY_VERIFY(flickable->isMoving());
QCOMPARE(flickable->isMovingHorizontally(), horizontalEnabled);
QCOMPARE(flickable->isMovingVertically(), verticalEnabled);
QVERIFY(flickable->isFlicking());
@@ -695,7 +695,7 @@ void tst_qquickflickable::movingAndFlicking()
QTRY_VERIFY(!flickable->isMoving());
flick(window, flickFrom, flickToWithSnapBack, 200);
- QVERIFY(flickable->isMoving());
+ QTRY_VERIFY(flickable->isMoving());
QCOMPARE(flickable->isMovingHorizontally(), horizontalEnabled);
QCOMPARE(flickable->isMovingVertically(), verticalEnabled);
QVERIFY(flickable->isFlicking());
@@ -999,7 +999,7 @@ void tst_qquickflickable::pressWhileFlicking()
// flicking == false, moving == true;
flick(window, QPoint(20,190), QPoint(20, 50), 200);
QVERIFY(flickable->verticalVelocity() > 0.0);
- QVERIFY(flickable->isFlicking());
+ QTRY_VERIFY(flickable->isFlicking());
QVERIFY(flickable->isFlickingVertically());
QVERIFY(!flickable->isFlickingHorizontally());
QVERIFY(flickable->isMoving());
@@ -1257,7 +1257,7 @@ void tst_qquickflickable::flickTwiceUsingTouches()
window->setSource(testFileUrl("longList.qml"));
window->show();
window->requestActivate();
- QTest::qWaitForWindowActive(window);
+ QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());