mirror of https://github.com/procxx/kepka.git
Fix several bugs for macOS 10.14.
This commit is contained in:
parent
7f39d917ab
commit
cf9f7ef508
|
@ -253,7 +253,7 @@ index 41834b21ae..8cdf4ab145 100644
|
||||||
setError(QAbstractSocket::NetworkError, AddressNotAvailableErrorString);
|
setError(QAbstractSocket::NetworkError, AddressNotAvailableErrorString);
|
||||||
socketState = QAbstractSocket::UnconnectedState;
|
socketState = QAbstractSocket::UnconnectedState;
|
||||||
diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||||
index 4d6e707..9bdb0be 100644
|
index 4d6e70720d..9bdb0beb67 100644
|
||||||
--- a/src/platformsupport/dbustray/qdbustrayicon.cpp
|
--- a/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||||
+++ b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
+++ b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||||
@@ -58,9 +58,18 @@ QT_BEGIN_NAMESPACE
|
@@ -58,9 +58,18 @@ QT_BEGIN_NAMESPACE
|
||||||
|
@ -667,7 +667,7 @@ index c2d206fb45..9b9739862d 100644
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||||
index 8152c57ffd..5ddd7b353d 100644
|
index 8152c57ffd..87ba2f3f72 100644
|
||||||
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||||
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||||
@@ -94,6 +94,8 @@ QT_USE_NAMESPACE
|
@@ -94,6 +94,8 @@ QT_USE_NAMESPACE
|
||||||
|
@ -783,7 +783,19 @@ index 8152c57ffd..5ddd7b353d 100644
|
||||||
systray = sys;
|
systray = sys;
|
||||||
imageCell = [[QNSImageView alloc] initWithParent:self];
|
imageCell = [[QNSImageView alloc] initWithParent:self];
|
||||||
[item setView: imageCell];
|
[item setView: imageCell];
|
||||||
@@ -482,6 +513,10 @@ QT_END_NAMESPACE
|
@@ -448,6 +479,11 @@ QT_END_NAMESPACE
|
||||||
|
-(void)dealloc {
|
||||||
|
[[NSStatusBar systemStatusBar] removeStatusItem:item];
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:imageCell];
|
||||||
|
+
|
||||||
|
+ // Patch: Fix crash in macOS 10.14.
|
||||||
|
+ // Somehow item and imageCell are retained and attempt to be drawn if left in view.
|
||||||
|
+ [item setView: nil];
|
||||||
|
+
|
||||||
|
[imageCell release];
|
||||||
|
[item release];
|
||||||
|
[super dealloc];
|
||||||
|
@@ -482,6 +518,10 @@ QT_END_NAMESPACE
|
||||||
selector:@selector(menuTrackingDone:)
|
selector:@selector(menuTrackingDone:)
|
||||||
name:NSMenuDidEndTrackingNotification
|
name:NSMenuDidEndTrackingNotification
|
||||||
object:m];
|
object:m];
|
||||||
|
|
|
@ -121,7 +121,12 @@ ApplicationDelegate *_sharedDelegate = nil;
|
||||||
});
|
});
|
||||||
#ifndef OS_MAC_STORE
|
#ifndef OS_MAC_STORE
|
||||||
if ([SPMediaKeyTap usesGlobalMediaKeyTap]) {
|
if ([SPMediaKeyTap usesGlobalMediaKeyTap]) {
|
||||||
_keyTap = [[SPMediaKeyTap alloc] initWithDelegate:self];
|
if (QSysInfo::macVersion() < Q_MV_OSX(10, 14)) {
|
||||||
|
_keyTap = [[SPMediaKeyTap alloc] initWithDelegate:self];
|
||||||
|
} else {
|
||||||
|
// In macOS Mojave it requires accessibility features.
|
||||||
|
LOG(("Media key monitoring disabled in Mojave."));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG(("Media key monitoring disabled"));
|
LOG(("Media key monitoring disabled"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
<key>NOTE</key>
|
<key>NOTE</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>We need access to your microphone so that you can record voice messages and make calls.</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
|
Loading…
Reference in New Issue