diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-09-15 09:58:27 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-09-15 17:49:34 +0200 |
commit | 276943c8b791ba5897dcdb1ecfda780ac33a090b (patch) | |
tree | e56ba5476bc2f65ceba992262983140934e4f5ae /src/gui | |
parent | 62b658ee8e1d2b46caaecef8f13c9031178a57f8 (diff) |
Make the closeAllPopup helper virtual in QGuiApplication
QPA plugins might have to close popups for events that are not delivered
to QWindow or QWidget instances. For instance, the Cocoa plugin has to
explicilty close popups when the user clicks into the window frame.
Expose this functionality through a virtual in QGuiApplicationPrivate,
and move the QApplication implementation from a static helper into the
override.
Task-number: QTBUG-96450
Change-Id: I52be5710c8d7515b9ae2e4bbadb069df4b3ed546
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index b98a1b9ecf..7b28c70993 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -223,6 +223,7 @@ public: static void updateBlockedStatus(QWindow *window); virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = nullptr) const; virtual bool popupActive() { return false; } + virtual bool closeAllPopups() { return false; } static Qt::MouseButton mousePressButton; static QPointF lastCursorPosition; |