aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@jollamobile.com>2013-08-12 13:28:17 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-19 02:50:29 +0200
commit566afc2d2e4156712ffec081715f12307cf46628 (patch)
treeb4f6f77c6898077659fee0c9f449b889f2678880 /tests/auto/quick/qquickmousearea
parent180180d19545665efbf0f939778845a44cb92003 (diff)
Dragging MouseArea nested in Flickable does not work with touch to mouse
A MouseArea with a drag target nested in a Flickable does not work. This is due to QQuickWindow calling childMouseEventFilter() twice - once in sendFilteredTouchEvent() and later in sendEvent(). Since childMouseEventFilter() has already been called, deliver the mouse event directly in sendFilteredTouchEvent(). Task-number: QTBUG-32920 Change-Id: I22acee3c66ee6c06e71c9c876fb02dbcb6119a8d Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'tests/auto/quick/qquickmousearea')
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index a582c62701..f92612e411 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -1198,18 +1198,15 @@ void tst_QQuickMouseArea::transformedMouseArea()
foreach (const QPoint &point, points) {
// check hover
QTest::mouseMove(window, point);
- QTest::qWait(10);
- QCOMPARE(mouseArea->property("containsMouse").toBool(), insideTarget);
+ QTRY_COMPARE(mouseArea->property("containsMouse").toBool(), insideTarget);
// check mouse press
QTest::mousePress(window, Qt::LeftButton, 0, point);
- QTest::qWait(10);
- QCOMPARE(mouseArea->property("pressed").toBool(), insideTarget);
+ QTRY_COMPARE(mouseArea->property("pressed").toBool(), insideTarget);
// check mouse release
QTest::mouseRelease(window, Qt::LeftButton, 0, point);
- QTest::qWait(10);
- QCOMPARE(mouseArea->property("pressed").toBool(), false);
+ QTRY_COMPARE(mouseArea->property("pressed").toBool(), false);
}
delete window;
@@ -1514,8 +1511,8 @@ void tst_QQuickMouseArea::nestedStopAtBounds()
QTest::mouseMove(&view, position);
axis += invert ? -threshold : threshold;
QTest::mouseMove(&view, position);
- QCOMPARE(outer->drag()->active(), false);
- QCOMPARE(inner->drag()->active(), true);
+ QTRY_COMPARE(outer->drag()->active(), false);
+ QTRY_COMPARE(inner->drag()->active(), true);
QTest::mouseRelease(&view, Qt::LeftButton, 0, position);
}