From 5ac35524dcd0ed28b527be7c3c44b07f659c6357 Mon Sep 17 00:00:00 2001 From: kleuter Date: Sat, 30 Nov 2019 11:58:13 +0100 Subject: [PATCH] 5.13.2: sync fix for QTBUG-18624 from 5.14 branch --- .../platforms/cocoa/qcocoaapplicationdelegate.mm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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)