5.13.2: sync fix for QTBUG-18624 from 5.14 branch

This commit is contained in:
kleuter 2019-11-30 11:58:13 +01:00
parent d7048c2056
commit 5ac35524dc

View File

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