aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-09-18 21:59:48 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-09-26 09:56:23 +0200
commit0bd86b0e2ee67c3f99b8a9712c743c25c8be39b8 (patch)
tree6b5f7c898366871cf65ae30c5ca943a45e5c9d47 /tests/auto/quick
parent26e5788a273b8614e9b9e701d29a7b6c77adacc0 (diff)
Handle ungrab and grab-cancel consistently; inform handlers
Call onGrabChanged on Pointer Handlers during grab transitions: this was missing in a97759a336c597327cb82eebc9f45c793aec32c9. Flickable needs to receive an ungrab by child-event-filtering, in order to set its pressed state back to false (as in the cancelOnHide autotest). This is best done as a result of the QPointingDevice::grabChanged signal, while trying to send the ungrab to the item that was the grabber, rather than as a special case. Thus, QQuickWindowPrivate::onGrabChanged (the handler for the QPointingDevice::grabChanged signal) is now the only place from which we call QQuickItem::mouseUngrabEvent() and touchUngrabEvent(). But the result is that they are called in more cases than before, so some tests need adjustment. touchUngrabEvent() is not sent unless the event is available and we can verify that all points have been released. This is important for MultiPointTouchArea: it will react by ending interaction with all points at once. Another thing that's important to MPTA and multi-touch handlers is that QQuickWindowPrivate::deliverPointerEvent() must not clear grabbers of points that are not yet released, in the case that only some points are. QQuickWindowPrivate::removeGrabber() now calls QPointingDevicePrivate::removeGrabber() with its optional cancel argument, so that it will emit either a cancel or an ungrab transition. That's only relevant for Pointer Handlers, whereas QQuickItem mouseUngrabEvent and touchUngrabEvent don't make a distinction. Task-number: QTBUG-86729 Change-Id: Idf03aef2e2182398e0fc4a606c0ddbb2aaed5681 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST7
-rw-r--r--tests/auto/quick/pointerhandlers/qquickdraghandler/BLACKLIST8
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST2
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpointerhandler/BLACKLIST6
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpointhandler/BLACKLIST4
-rw-r--r--tests/auto/quick/pointerhandlers/qquicktaphandler/BLACKLIST8
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp9
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/BLACKLIST4
8 files changed, 6 insertions, 42 deletions
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
index 75d596fcab..92903955ac 100644
--- a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
@@ -1,14 +1,7 @@
[touchAndDragHandlerOnFlickable]
windows gcc
opensuse-leap
-* # QTBUG-86729
[touchDragFlickableBehindSlider]
windows gcc
[touchDragFlickableBehindButton]
windows gcc
-[dragHandlerInSiblingStealingGrabFromMouseAreaViaTouch]
-* # QTBUG-86729
-[mouseDragFlickableBehindButton]
-* # QTBUG-86729
-[touchDragFlickableBehindButton]
-* # QTBUG-86729
diff --git a/tests/auto/quick/pointerhandlers/qquickdraghandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquickdraghandler/BLACKLIST
deleted file mode 100644
index e8ceb1c2a7..0000000000
--- a/tests/auto/quick/pointerhandlers/qquickdraghandler/BLACKLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-[mouseClickButton] # QTBUG-86729
-*
-[touchPassiveGrabbers]
-* # QTBUG-86729
-[touchDragMultiSliders]
-* # QTBUG-86729
-[snapMode]
-* # QTBUG-86729
diff --git a/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST
deleted file mode 100644
index 9dfa00a2be..0000000000
--- a/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[scaleThreeFingers]
-* # QTBUG-86729
diff --git a/tests/auto/quick/pointerhandlers/qquickpointerhandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquickpointerhandler/BLACKLIST
index 9a443d66b4..0fa9daa4cf 100644
--- a/tests/auto/quick/pointerhandlers/qquickpointerhandler/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/qquickpointerhandler/BLACKLIST
@@ -1,6 +1,4 @@
-[touchReleaseOutside]
-* # QTBUG-86729
[mouseEventDelivery]
-* # QTBUG-86729
+macos # QTBUG-86729
[touchEventDelivery]
-* # QTBUG-86729
+macos # QTBUG-86729
diff --git a/tests/auto/quick/pointerhandlers/qquickpointhandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquickpointhandler/BLACKLIST
index abeff5b725..3dd33b0a09 100644
--- a/tests/auto/quick/pointerhandlers/qquickpointhandler/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/qquickpointhandler/BLACKLIST
@@ -1,6 +1,2 @@
[pressedMultipleButtons] # QTBUG-86729
*
-[singleTouch]
-* # QTBUG-86729
-[simultaneousMultiTouch]
-* # QTBUG-86729
diff --git a/tests/auto/quick/pointerhandlers/qquicktaphandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquicktaphandler/BLACKLIST
index 4f25e9ba97..b26e383304 100644
--- a/tests/auto/quick/pointerhandlers/qquicktaphandler/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/qquicktaphandler/BLACKLIST
@@ -1,10 +1,2 @@
-[mouseGesturePolicyDragThreshold] # QTBUG-86729
-*
-[touchGesturePolicyDragThreshold]
-* # QTBUG-86729
-[touchMouseGesturePolicyDragThreshold]
-* # QTBUG-86729
-[buttonsMultiTouch]
-* # QTBUG-86729
[componentUserBehavioralOverride]
* # QTBUG-86729
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 0a75690904..94f2451c97 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -123,7 +123,6 @@ protected:
void touchUngrabEvent() override
{
++ungrabs;
- QVERIFY(m_active);
emit ungrabbed();
m_active = false;
emit activeChanged();
@@ -2022,9 +2021,9 @@ void tst_qquickflickable::nestedSliderUsingTouch_data()
QTest::addColumn<int>("releases");
QTest::addColumn<int>("ungrabs");
- QTest::newRow("keepBoth") << true << true << 8 << 1 << 0;
- QTest::newRow("keepMouse") << true << false << 8 << 1 << 0;
- QTest::newRow("keepTouch") << false << true << 8 << 1 << 0;
+ QTest::newRow("keepBoth") << true << true << 8 << 1 << 1;
+ QTest::newRow("keepMouse") << true << false << 8 << 1 << 1;
+ QTest::newRow("keepTouch") << false << true << 8 << 1 << 1;
QTest::newRow("keepNeither") << false << false << 5 << 0 << 1;
}
@@ -2064,7 +2063,7 @@ void tst_qquickflickable::nestedSliderUsingTouch()
QTest::touchEvent(window, touchDevice).move(0, p0, window);
QQuickTouchUtils::flush(window);
}
- QCOMPARE(tda->active(), !ungrabs);
+ QCOMPARE(tda->active(), keepMouseGrab | keepTouchGrab);
QTest::touchEvent(window, touchDevice).release(0, p0, window);
QQuickTouchUtils::flush(window);
QTRY_COMPARE(tda->touchPointStates.first(), QEventPoint::State::Pressed);
diff --git a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST
index b70e5bc3b8..f356dfb29a 100644
--- a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST
+++ b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST
@@ -13,8 +13,6 @@ sles
* # QTBUG-86729
[stationaryTouchWithChangingPressure] # QTBUG-86729
*
-[cancel]
-* # QTBUG-86729
[inFlickable]
* # QTBUG-86729
[inFlickable2]
@@ -23,5 +21,3 @@ sles
* # QTBUG-86729
[reuse]
* # QTBUG-86729
-[signalTest]
-* # QTBUG-86729