From 69162120c735801905893f90bef38b49464f6bb9 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 1 Dec 2020 09:27:22 +0100 Subject: 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 --- tests/auto/controls/basic/BLACKLIST | 19 ------------------- tests/auto/controls/data/tst_swipedelegate.qml | 5 +++-- tests/auto/controls/fusion/BLACKLIST | 19 ------------------- tests/auto/controls/imagine/BLACKLIST | 19 ------------------- tests/auto/controls/material/BLACKLIST | 19 ------------------- tests/auto/controls/universal/BLACKLIST | 19 ------------------- 6 files changed, 3 insertions(+), 97 deletions(-) (limited to 'tests') 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] * -- cgit v1.2.3