diff --git a/5.13.2/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/5.13.2/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index a183406..b88c28a 100644 --- a/5.13.2/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/5.13.2/qtbase/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -227,10 +227,7 @@ QT_USE_NAMESPACE application depends on. */ NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager]; - /*[eventManager setEventHandler:self - andSelector:@selector(appleEventQuit:withReplyEvent:) - forEventClass:kCoreEventClass - andEventID:kAEQuitApplication];*/ + [eventManager setEventHandler:self andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass @@ -241,7 +238,7 @@ QT_USE_NAMESPACE - (void)removeAppleEventHandlers { NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager]; - //[eventManager removeEventHandlerForEventClass:kCoreEventClass andEventID:kAEQuitApplication]; + [eventManager removeEventHandlerForEventClass:kInternetEventClass andEventID:kAEGetURL]; } @@ -376,13 +373,6 @@ QT_USE_NAMESPACE QWindowSystemInterface::handleFileOpenEvent(QUrl(QString::fromNSString(urlString))); } -- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent -{ - Q_UNUSED(event); - Q_UNUSED(replyEvent); - [NSApp terminate:self]; -} - @end @implementation QCocoaApplicationDelegate (Menus)