From 099a622281cd403dddc9e581cedccfac5fd1160b Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 25 Jun 2024 12:10:11 -0700 Subject: [PATCH] Remove unused qt_pressGrab in qwidget.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I can't find evidence that it has been anything other than nullptr since the 2011 "Qt by Nokia" commit at least. Change-Id: I191f35b1fc8ca06c5c28696fed5c44f1e8c30f59 Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qwidget.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 33fd9bfe4b4..540a8930493 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -12684,7 +12684,6 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const return mapFromGlobal(QPointF(pos)).toPoint(); } -QWidget *qt_pressGrab = nullptr; QWidget *qt_mouseGrb = nullptr; static bool mouseGrabWithCursor = false; static QWidget *keyboardGrb = nullptr; @@ -12719,7 +12718,6 @@ static void grabMouseForWidget(QWidget *widget) } qt_mouseGrb = widget; - qt_pressGrab = nullptr; } static void releaseMouseGrabOfWidget(QWidget *widget) @@ -12880,9 +12878,7 @@ void QWidget::releaseKeyboard() */ QWidget *QWidget::mouseGrabber() { - if (qt_mouseGrb) - return qt_mouseGrb; - return qt_pressGrab; + return qt_mouseGrb; } /*!