summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2016-07-22 15:28:25 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2016-08-01 18:32:42 +0000
commita9603ef7d42c15090d86d04d1bc6aaf684257862 (patch)
treed2b352a4b67f0699722cbb57dfd29869af063f06 /src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
parentc4b4eba188d2fc0273aaa38533e19dcbd4cfc7be (diff)
Cocoa QPA Menus: Clean-up QCocoaMenuLoader related code
Now that QCocoaMenuLoader is a singleton, we can access it the natural way. In all cases, it already needed to be done in an Objective-C file, so it doesn't change anything from this point of view. Furthermore, we decide to remove private accessor APIs in QCocoaApplication and QCocoaApplicationDelegate which are now redundant. Change-Id: I4190ed2e2536b778482c513727e279c9318acb7e Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 062ffc3933..4874fcf807 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -168,23 +168,12 @@ QT_END_NAMESPACE
return [[dockMenu retain] autorelease];
}
-- (void)setMenuLoader:(QCocoaMenuLoader *)menuLoader
-{
- Q_UNUSED(menuLoader);
- qWarning("-[QCocoaApplicationDelegate setMenuLoader:] is deprecated and is currently a no-op.");
-}
-
-- (QCocoaMenuLoader *)menuLoader
-{
- return [QT_MANGLE_NAMESPACE(QCocoaMenuLoader) sharedMenuLoader];
-}
-
- (BOOL) canQuit
{
[[NSApp mainMenu] cancelTracking];
bool handle_quit = true;
- NSMenuItem *quitMenuItem = [[[QCocoaApplicationDelegate sharedDelegate] menuLoader] quitMenuItem];
+ NSMenuItem *quitMenuItem = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) sharedMenuLoader] quitMenuItem];
if (!QGuiApplicationPrivate::instance()->modalWindowList.isEmpty()
&& [quitMenuItem isEnabled]) {
int visible = 0;