summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoahelpers.mm
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-10-01 21:48:17 -0700
committerJani Heikkinen <jani.heikkinen@qt.io>2017-10-09 07:05:03 +0000
commit0707260a4f8e64dfadf1df5f935e74cabb7c7d27 (patch)
tree794d56b5e09144e63ff43ff267e29017e7c19471 /src/plugins/platforms/cocoa/qcocoahelpers.mm
parentacfcf1470a32486d42b3897b4193f497c921e915 (diff)
Fix build error with macOS 10.13 SDK
Several of these variables/macros are no longer defined. We didn't validate the preconditions on iOS, tvOS, or watchOS, so no need to bother validating them on macOS either. Nor did we check the OSStatus result on any platform anyways. Task-number: QTBUG-63401 Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3 (cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoahelpers.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index cd73148752..3f8429eb6d 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -544,15 +544,8 @@ NSRect qt_mac_flipRect(const QRect &rect)
return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
}
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
{
- // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
- OSStatus err = noErr;
-
- require_action(inContext != NULL, InvalidContext, err = paramErr);
- require_action(inBounds != NULL, InvalidBounds, err = paramErr);
- require_action(inImage != NULL, InvalidImage, err = paramErr);
-
CGContextSaveGState( inContext );
CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
CGContextScaleCTM(inContext, 1, -1);
@@ -560,10 +553,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm
CGContextDrawImage(inContext, *inBounds, inImage);
CGContextRestoreGState(inContext);
-InvalidImage:
-InvalidBounds:
-InvalidContext:
- return err;
}
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)