From 556beea4c373395e16aa00ae7e5e5db8e6f46468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 24 Aug 2018 16:51:23 +0200 Subject: macOS: Update all deprecated enums to their 10.12+ equivalents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3034258da95c9c70eb6758db92967f438617f6e9 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaapplication.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoaapplication.mm') diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.mm b/src/plugins/platforms/cocoa/qcocoaapplication.mm index 11f3bd0384..340191622a 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplication.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplication.mm @@ -116,8 +116,8 @@ static bool qt_filterEvent(NSEvent *event) filterNativeEvent(q_macLocalEventType, static_cast(event), nullptr)) return true; - if ([event type] == NSApplicationDefined) { - switch (static_cast([event subtype])) { + if (event.type == NSEventTypeApplicationDefined) { + switch (static_cast(event.subtype)) { case QtCocoaEventSubTypePostMessage: qt_sendPostedMessage(event); return true; @@ -137,7 +137,7 @@ static void qt_maybeSendKeyEquivalentUpEvent(NSEvent *event) // and forward the key event to the key (focus) window. // However, non-Qt windows will not (and should not) get // any special treatment, only QWindow-owned NSWindows. - if (event.type == NSKeyUp && (event.modifierFlags & NSCommandKeyMask)) { + if (event.type == NSEventTypeKeyUp && (event.modifierFlags & NSEventModifierFlagCommand)) { NSWindow *targetWindow = event.window; if ([targetWindow.class conformsToProtocol:@protocol(QNSWindowProtocol)]) [targetWindow sendEvent:event]; -- cgit v1.2.3