diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-30 19:35:26 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-11 12:16:15 +0100 |
commit | d7623d79ef4bc9533fced027bf1d173d68b4eba6 (patch) | |
tree | 9595924e962c340d8efb9c74c66f053f09c379da /tests/auto/quick/qquickmultipointtoucharea | |
parent | 25c5ace02747753c524960abbf6fb81de1d11c6d (diff) |
Teach flickable to handle and replay touch as it does mouse
QQuickWindowPrivate::cloneMouseEvent() renamed to clonePointerEvent()
and generalized to be able to clone any of the kinds of QPointerEvent
that we're interested in replaying. Now it is used only in
QQuickFlickablePrivate::captureDelayedPress().
Reverts f278bb7c66bb00c9f81b7a3aceeb94cb9b3a1b66 and
012a4528a515af8d7ec7dbc05a38d8fd0d6d4d1b (don't skip
tst_TouchMouse::buttonOnDelayedPressFlickable). Some test changes
from f128b5dee8a2a03ebc55ed0cd1e749a6599282c3 also get reverted.
QEventPoint should always have valid velocity now, so
Flickable no longer has to calculate it for itself.
Removing that became necessary to fix the movingAndFlicking test.
Adds logging categories qt.quick.flickable.filter and .replay.
Fixes: QTBUG-85607
Task-number: QTBUG-83437
Task-number: QTBUG-78818
Task-number: QTBUG-61144
Task-number: QTBUG-88038
Task-number: QTBUG-88138
Change-Id: I0ed6802dff5e5d1595adddc389642925f1f2c93d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickmultipointtoucharea')
-rw-r--r-- | tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp index 70f5460c44..bfe09acca9 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp +++ b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp @@ -121,7 +121,7 @@ void tst_QQuickMultiPointTouchArea::signalTest() QQuickTouchUtils::flush(window.data()); QCOMPARE(area->property("touchPointPressCount").toInt(), 1); - QCOMPARE(area->property("touchPointUpdateCount").toInt(), 0); + QCOMPARE(area->property("touchPointUpdateCount").toInt(), 2); QCOMPARE(area->property("touchPointReleaseCount").toInt(), 0); QCOMPARE(area->property("touchCount").toInt(), 3); QMetaObject::invokeMethod(area, "clearCounts"); @@ -132,7 +132,7 @@ void tst_QQuickMultiPointTouchArea::signalTest() QQuickTouchUtils::flush(window.data()); QCOMPARE(area->property("touchPointPressCount").toInt(), 0); - QCOMPARE(area->property("touchPointUpdateCount").toInt(), 2); + QCOMPARE(area->property("touchPointUpdateCount").toInt(), 3); QCOMPARE(area->property("touchPointReleaseCount").toInt(), 0); QCOMPARE(area->property("touchCount").toInt(), 3); QMetaObject::invokeMethod(area, "clearCounts"); @@ -677,8 +677,10 @@ void tst_QQuickMultiPointTouchArea::inFlickable() i, p1.x(), p1.y(), p2.x(), p2.y(), flickable->contentY()); } + QEXPECT_FAIL("", "currently flickable does grab the actual mouse", Continue); QCOMPARE(flickable->contentY(), qreal(0)); QCOMPARE(point11->pressed(), true); + QEXPECT_FAIL("", "currently flickable does grab the actual mouse", Continue); QCOMPARE(point12->pressed(), true); QTest::touchEvent(window.data(), device).release(0, p1).release(1, p2); @@ -783,6 +785,7 @@ void tst_QQuickMultiPointTouchArea::inFlickableWithPressDelay() // QTBUG-78818 QQuickMultiPointTouchArea *mpta = window->rootObject()->findChild<QQuickMultiPointTouchArea*>(); QVERIFY(mpta != nullptr); + mpta->setMouseEnabled(false); // don't depend on synth-mouse mpta->setMinimumTouchPoints(1); QQuickTouchPoint *point11 = window->rootObject()->findChild<QQuickTouchPoint*>("point1"); QPoint p1(20,100); |