aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-12-01 09:27:22 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2021-03-23 09:21:16 +0100
commit69162120c735801905893f90bef38b49464f6bb9 (patch)
tree7c644040c40caef576334b5af7fa8b2dca731abb /tests
parent067e61f580614c08761a59656a4b31761e4e7878 (diff)
Handle directly-delivered mouse events in SwipeDelegate
Delivery order has changed to be the same as the z-axis stacking order (since qtdeclarative 3ff11ceca37dcc4b6f0420332fa7f6aa007be7f3). Since QQuickSwipeDelegate puts its children under itself by setting negative z-values, it can now receive mouse events before those negative-z children, directly rather than via childMouseEventFilter(). It doesn't seem to be enough to ignore() the events and let them propagate: we now need to explicitly forward them to interactive child items, and to child items' Attached objects, if any. Pick-to: 6.0 6.1 Fixes: QTBUG-87018 Fixes: QTBUG-87789 Change-Id: I1e02ceddad7c3221fb09a33046941d654bfa8a4b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/basic/BLACKLIST19
-rw-r--r--tests/auto/controls/data/tst_swipedelegate.qml5
-rw-r--r--tests/auto/controls/fusion/BLACKLIST19
-rw-r--r--tests/auto/controls/imagine/BLACKLIST19
-rw-r--r--tests/auto/controls/material/BLACKLIST19
-rw-r--r--tests/auto/controls/universal/BLACKLIST19
6 files changed, 3 insertions, 97 deletions
diff --git a/tests/auto/controls/basic/BLACKLIST b/tests/auto/controls/basic/BLACKLIST
index df7f4b3e..47634070 100644
--- a/tests/auto/controls/basic/BLACKLIST
+++ b/tests/auto/controls/basic/BLACKLIST
@@ -1,24 +1,5 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-# https://bugreports.qt.io/browse/QTBUG-87018
-[SwipeDelegate::test_close]
-*
-
-[SwipeDelegate::test_dragSideAction]
-*
-
-[SwipeDelegate::test_eventsToLeftAndRight]
-*
-
-[SwipeDelegate::test_mouseButtons]
-*
-
-[SwipeDelegate::test_multipleClickableActions]
-*
-
-[SwipeDelegate::test_removableDelegates]
-*
-
# QTBUG-70597
[Tumbler::test_itemsCorrectlyPositioned]
*
diff --git a/tests/auto/controls/data/tst_swipedelegate.qml b/tests/auto/controls/data/tst_swipedelegate.qml
index 78483406..17440042 100644
--- a/tests/auto/controls/data/tst_swipedelegate.qml
+++ b/tests/auto/controls/data/tst_swipedelegate.qml
@@ -780,7 +780,7 @@ TestCase {
mousePress(listView, firstItem.width / 2, firstItem.height / 2);
verify(firstItem.swipe.leftItem.SwipeDelegate.pressed);
compare(leftClickedSpy.count, 0);
- verify(!firstItem.pressed);
+ verify(firstItem.pressed);
mouseRelease(listView, firstItem.width / 2, firstItem.height / 2);
verify(!firstItem.swipe.leftItem.SwipeDelegate.pressed);
@@ -1076,7 +1076,8 @@ TestCase {
text: "SwipeDelegate"
width: 150
- swipe.right: Item {
+ swipe.right: Rectangle {
+ color: "green"
width: parent.width
height: parent.height
diff --git a/tests/auto/controls/fusion/BLACKLIST b/tests/auto/controls/fusion/BLACKLIST
index df7f4b3e..47634070 100644
--- a/tests/auto/controls/fusion/BLACKLIST
+++ b/tests/auto/controls/fusion/BLACKLIST
@@ -1,24 +1,5 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-# https://bugreports.qt.io/browse/QTBUG-87018
-[SwipeDelegate::test_close]
-*
-
-[SwipeDelegate::test_dragSideAction]
-*
-
-[SwipeDelegate::test_eventsToLeftAndRight]
-*
-
-[SwipeDelegate::test_mouseButtons]
-*
-
-[SwipeDelegate::test_multipleClickableActions]
-*
-
-[SwipeDelegate::test_removableDelegates]
-*
-
# QTBUG-70597
[Tumbler::test_itemsCorrectlyPositioned]
*
diff --git a/tests/auto/controls/imagine/BLACKLIST b/tests/auto/controls/imagine/BLACKLIST
index df7f4b3e..47634070 100644
--- a/tests/auto/controls/imagine/BLACKLIST
+++ b/tests/auto/controls/imagine/BLACKLIST
@@ -1,24 +1,5 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-# https://bugreports.qt.io/browse/QTBUG-87018
-[SwipeDelegate::test_close]
-*
-
-[SwipeDelegate::test_dragSideAction]
-*
-
-[SwipeDelegate::test_eventsToLeftAndRight]
-*
-
-[SwipeDelegate::test_mouseButtons]
-*
-
-[SwipeDelegate::test_multipleClickableActions]
-*
-
-[SwipeDelegate::test_removableDelegates]
-*
-
# QTBUG-70597
[Tumbler::test_itemsCorrectlyPositioned]
*
diff --git a/tests/auto/controls/material/BLACKLIST b/tests/auto/controls/material/BLACKLIST
index df7f4b3e..47634070 100644
--- a/tests/auto/controls/material/BLACKLIST
+++ b/tests/auto/controls/material/BLACKLIST
@@ -1,24 +1,5 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-# https://bugreports.qt.io/browse/QTBUG-87018
-[SwipeDelegate::test_close]
-*
-
-[SwipeDelegate::test_dragSideAction]
-*
-
-[SwipeDelegate::test_eventsToLeftAndRight]
-*
-
-[SwipeDelegate::test_mouseButtons]
-*
-
-[SwipeDelegate::test_multipleClickableActions]
-*
-
-[SwipeDelegate::test_removableDelegates]
-*
-
# QTBUG-70597
[Tumbler::test_itemsCorrectlyPositioned]
*
diff --git a/tests/auto/controls/universal/BLACKLIST b/tests/auto/controls/universal/BLACKLIST
index df7f4b3e..47634070 100644
--- a/tests/auto/controls/universal/BLACKLIST
+++ b/tests/auto/controls/universal/BLACKLIST
@@ -1,24 +1,5 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-# https://bugreports.qt.io/browse/QTBUG-87018
-[SwipeDelegate::test_close]
-*
-
-[SwipeDelegate::test_dragSideAction]
-*
-
-[SwipeDelegate::test_eventsToLeftAndRight]
-*
-
-[SwipeDelegate::test_mouseButtons]
-*
-
-[SwipeDelegate::test_multipleClickableActions]
-*
-
-[SwipeDelegate::test_removableDelegates]
-*
-
# QTBUG-70597
[Tumbler::test_itemsCorrectlyPositioned]
*