Suppress new macOS deprecation warnings

This commit is contained in:
Berkus Decker 2017-11-24 22:53:33 +02:00
parent 76c14bb933
commit 9e875ff268
2 changed files with 3 additions and 3 deletions

View File

@ -530,7 +530,7 @@ bool UnsafeShowOpenWith(const QString &filepath) {
NSArray *appsPaths = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask];
if ([appsPaths count]) [openPanel setDirectoryURL:[appsPaths firstObject]];
[openPanel beginWithCompletionHandler:^(NSInteger result){
if (result == NSFileHandlingPanelOKButton) {
if (result == NSModalResponseOK) {
if ([[openPanel URLs] count] > 0) {
NSURL *app = [[openPanel URLs] objectAtIndex:0];
NSString *path = [app path];

View File

@ -177,7 +177,7 @@ ApplicationDelegate *_sharedDelegate = nil;
}
- (void) mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)e {
if (e && [e type] == NSSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
if (e && [e type] == NSEventTypeSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
objc_handleMediaKeyEvent(e);
}
}
@ -256,7 +256,7 @@ void objc_showOverAll(WId winId, bool canFocus) {
NSWindow *wnd = [reinterpret_cast<NSView *>(winId) window];
[wnd setLevel:NSPopUpMenuWindowLevel];
if (!canFocus) {
[wnd setStyleMask:NSUtilityWindowMask | NSNonactivatingPanelMask];
[wnd setStyleMask:NSWindowStyleMaskUtilityWindow | NSWindowStyleMaskNonactivatingPanel];
[wnd setCollectionBehavior:NSWindowCollectionBehaviorMoveToActiveSpace|NSWindowCollectionBehaviorStationary|NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorIgnoresCycle];
}
}