diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-18 23:55:25 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-19 15:17:39 +0000 |
commit | d68419faf424df2492425baca789742f1a239af3 (patch) | |
tree | 2b5aaf3554649f398a27737be0953d87323ecbd2 /src/quick/items/qquickmousearea.cpp | |
parent | 2e7330f5797c90b4461d638fc839a7ab92906d30 (diff) |
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 <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick/items/qquickmousearea.cpp')
-rw-r--r-- | src/quick/items/qquickmousearea.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index b306c0ddf4..6e7688a734 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -1038,12 +1038,6 @@ void QQuickMouseArea::timerEvent(QTimerEvent *event) } } -void QQuickMouseArea::windowDeactivateEvent() -{ - ungrabMouse(); - QQuickItem::windowDeactivateEvent(); -} - void QQuickMouseArea::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QQuickMouseArea); |