1
0
mirror of https://github.com/danog/patches.git synced 2024-12-02 09:17:58 +01:00
patches/qtbase_5_12_8/0011-fix-termination-on-macos.patch
Ilya Fedin 2b9afa7592 Separate patches
Backport support for opening directories with xdg desktop portals

Backport fix for ibus on wayland
2020-06-02 22:21:04 +04:00

28 lines
1.2 KiB
Diff

diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 2cf6672da9..ef25bb4541 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -175,7 +175,8 @@ QT_USE_NAMESPACE
if (reflectionDelegate) {
if ([reflectionDelegate respondsToSelector:@selector(applicationShouldTerminate:)])
return [reflectionDelegate applicationShouldTerminate:sender];
- return NSTerminateNow;
+ // Patch: Don't terminate if reflectionDelegate does not respond to that selector, just use the default.
+ //return NSTerminateNow;
}
if ([self canQuit]) {
@@ -252,7 +253,11 @@ QT_USE_NAMESPACE
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
- Q_UNUSED(aNotification);
+ // Patch: We need to catch that notification in delegate.
+ if (reflectionDelegate
+ && [reflectionDelegate respondsToSelector:@selector(applicationDidFinishLaunching:)])
+ [reflectionDelegate applicationDidFinishLaunching:aNotification];
+
inLaunch = false;
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {