diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index d18df35b80..da755aa189 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -122,7 +122,6 @@ QT_END_NAMESPACE { sharedCocoaApplicationDelegate = nil; [dockMenu release]; - [qtMenuLoader release]; if (reflectionDelegate) { [[NSApplication sharedApplication] setDelegate:reflectionDelegate]; [reflectionDelegate release]; @@ -169,24 +168,12 @@ QT_END_NAMESPACE return [[dockMenu retain] autorelease]; } -- (void)setMenuLoader:(QCocoaMenuLoader *)menuLoader -{ - [menuLoader retain]; - [qtMenuLoader release]; - qtMenuLoader = menuLoader; -} - -- (QCocoaMenuLoader *)menuLoader -{ - return [[qtMenuLoader retain] autorelease]; -} - - (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; @@ -309,7 +296,7 @@ QT_END_NAMESPACE Q_UNUSED(sender); for (NSString *fileName in filenames) { - QString qtFileName = QCFString::toQString(fileName); + QString qtFileName = QString::fromNSString(fileName); if (inLaunch) { // We need to be careful because Cocoa will be nice enough to take // command line arguments and send them to us as events. Given the history @@ -437,7 +424,7 @@ QT_END_NAMESPACE { Q_UNUSED(replyEvent); NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; - QWindowSystemInterface::handleFileOpenEvent(QUrl(QCFString::toQString(urlString))); + QWindowSystemInterface::handleFileOpenEvent(QUrl(QString::fromNSString(urlString))); } - (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent @@ -447,10 +434,4 @@ QT_END_NAMESPACE [NSApp terminate:self]; } -- (void)qtDispatcherToQAction:(id)sender -{ - Q_UNUSED(sender); - [qtMenuLoader qtDispatcherToQPAMenuItem:sender]; -} - @end |