summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-08-29 11:10:16 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-08-30 19:34:50 +0000
commit6e2a5312db6ec933910407fe47c9d73d3170d0af (patch)
tree87666ced50c3c0ea06d15f180261726dfa774510 /tests/auto/widgets/graphicsview
parentd9381bc7c36bf31d9496e20425968dafeee855be (diff)
Revert "Forward touchEvents to children inside QGraphicsProxyWidget"
This reverts commit 1ecf2212fae176b78c9951a37df9e33eb24d4f2d. The fix is not correct after all. TouchBegin goes to the correct widget with the fix, but following TouchUpdate and TouchEnd events now go to the viewport, as QApplication::translateRawTouchEvent always gives precedence to the widget that Qt recorded to be the touch grabber, which is the viewport. This results in infinite recursion, as the proxy widget trying to send the touch events to the embedded widget (expecting that translateRawTouchEvent will split it up) ends up sending the events back to the viewport. Leave the added test case as QEXPECT_FAIL, reactivate the (never run, hence unnoticed) test that the fix broke. Pick-to: 6.2 6.1 Task-number: QTBUG-45737 Task-number: QTBUG-67819 Change-Id: I4810affb3cd066743ae94ab7beb2f0c06b60d211 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 4bd0dd0a8c..a2c7a6bf4b 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3782,8 +3782,6 @@ void tst_QGraphicsProxyWidget::wheelEventPropagation()
// QTBUG_45737
void tst_QGraphicsProxyWidget::forwardTouchEvent()
{
- QSKIP("Test is currently broken");
-
QGraphicsScene scene;
TouchWidget *widget = new TouchWidget;
@@ -3931,6 +3929,7 @@ void tst_QGraphicsProxyWidget::touchEventPropagation()
sequence.press(0, pushButton1->pos() + pb1Center + formProxy->pos().toPoint());
}
// ..., formProxy, pushButton1, formWidget
+ QEXPECT_FAIL("", "Touch events are not forwarded to children - QTBUG-67819", Abort);
QCOMPARE(eventSpy.count(), 6);
record = eventSpy.at(eventSpy.count() - 2);
QCOMPARE(record.receiver, pushButton1);