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/widgets/kernel/qapplication_p.h | |
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/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index ee41f91060..59c13f06af 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -145,6 +145,7 @@ public: static bool inPopupMode(); bool popupActive() override { return inPopupMode(); } + bool closeAllPopups() override; void closePopup(QWidget *popup); void openPopup(QWidget *popup); static void setFocusWidget(QWidget *focus, Qt::FocusReason reason); |