From d68419faf424df2492425baca789742f1a239af3 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 18 Nov 2020 23:55:25 +0100 Subject: Remove QQuickItem::windowDeactivateEvent(); cancel grabs instead When a QQuickWindow is deactivated, visiting every item in the entire scene to tell them the news isn't very efficient, especially considering that the only item that overrode this virtual function has been QQMouseArea, throughout the lifetime of Qt 5. If it's important to cancel grabs of MouseAreas, then it's equally important to cancel grabs of MultiPointTouchArea, pointer handlers, etc. It should be OK to delete the virtual function since it was never documented, and marked \internal, so hopefully no users are depending on it. The existing tst_QQuickMouseArea::pressedCanceledOnWindowDeactivate() test continues to pass, which proves that the WindowDeactivate event still has the desired effect on MouseArea. Change-Id: I0109370aba14096fb7777a83cf1b6763ac58013f Reviewed-by: Richard Moe Gustavsen Reviewed-by: Volker Hilsheimer --- src/quick/items/qquickwindow_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/items/qquickwindow_p.h') diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index 18a43487c1..6e4d24da85 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -187,6 +187,7 @@ public: bool compressTouchEvent(QTouchEvent *); void flushFrameSynchronousEvents(); void deliverDelayedTouchEvent(); + void handleWindowDeactivate(); // utility functions that used to be in QQuickPointerEvent et al. bool allUpdatedPointsAccepted(const QPointerEvent *ev); -- cgit v1.2.3