summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnswindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-24 16:51:23 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-31 12:35:45 +0000
commit556beea4c373395e16aa00ae7e5e5db8e6f46468 (patch)
tree9ec6c2058fd0bb46d22bc139d625d01362061cd0 /src/plugins/platforms/cocoa/qnswindow.mm
parentb02fe1bfe7bc5daa503dc3a274570aad0d8dca5a (diff)
macOS: Update all deprecated enums to their 10.12+ equivalents
Change-Id: I3034258da95c9c70eb6758db92967f438617f6e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.mm24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index 1ea49ad253..1b9dd95cbc 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -50,13 +50,13 @@ Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events");
static bool isMouseEvent(NSEvent *ev)
{
switch ([ev type]) {
- case NSLeftMouseDown:
- case NSLeftMouseUp:
- case NSRightMouseDown:
- case NSRightMouseUp:
- case NSMouseMoved:
- case NSLeftMouseDragged:
- case NSRightMouseDragged:
+ case NSEventTypeLeftMouseDown:
+ case NSEventTypeLeftMouseUp:
+ case NSEventTypeRightMouseDown:
+ case NSEventTypeRightMouseUp:
+ case NSEventTypeMouseMoved:
+ case NSEventTypeLeftMouseDragged:
+ case NSEventTypeRightMouseDragged:
return true;
default:
return false;
@@ -186,16 +186,16 @@ static bool isMouseEvent(NSEvent *ev)
/*!
Borderless windows need a transparent background
- Technically windows with NSTexturedBackgroundWindowMask (such
- as windows with unified toolbars) need to draw the textured
+ Technically windows with NSWindowStyleMaskTexturedBackground
+ (such as windows with unified toolbars) need to draw the textured
background of the NSWindow, and can't have a transparent
- background, but as NSBorderlessWindowMask is 0, you can't
- have a window with NSTexturedBackgroundWindowMask that is
+ background, but as NSWindowStyleMaskBorderless is 0, you can't
+ have a window with NSWindowStyleMaskTexturedBackground that is
also borderless.
*/
- (NSColor *)backgroundColor
{
- return self.styleMask == NSBorderlessWindowMask
+ return self.styleMask == NSWindowStyleMaskBorderless
? [NSColor clearColor] : qt_objcDynamicSuper();
}