summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoamenubar.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-04-26 19:09:32 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-05-03 22:51:01 +0000
commit8447f5f006287887ee2910d9710d7bd867aca6e8 (patch)
treea518c063b9f015814b84149aaeb2f70786c2ac91 /src/plugins/platforms/cocoa/qcocoamenubar.h
parent93cf1cf2e59328f1d969ad1cda5ffd7531c66aef (diff)
QShortcut: Try harder to find a widget for parentless menubars
Add QPlatformMenuBar::parentWindow(). Since we call handleReparent() every so often, it's reasonable to be able to get its value back. While this parent window won't give us much information from the point of view of the actual QWidget parent for the menubar, the main reason we will need this is to check for modality blockage. Indeed, QApplicationPrivate::tryModalHelper() only cares about the widget's window since modality blockage is decided at the window level. Change-Id: Ie79f483424b01e430bc9168ba82489e30d15aec6 Task-number: QTBUG-67938 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoamenubar.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenubar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.h b/src/plugins/platforms/cocoa/qcocoamenubar.h
index 0ed653911a..50b6e69720 100644
--- a/src/plugins/platforms/cocoa/qcocoamenubar.h
+++ b/src/plugins/platforms/cocoa/qcocoamenubar.h
@@ -60,6 +60,7 @@ public:
void removeMenu(QPlatformMenu *menu) override;
void syncMenu(QPlatformMenu *menuItem) override;
void handleReparent(QWindow *newParentWindow) override;
+ QWindow *parentWindow() const override;
QPlatformMenu *menuForTag(quintptr tag) const override;
inline NSMenu *nsMenu() const