--- src/plugins/platforms/cocoa/qcocoahelpers.mm.orig 2015-10-12 21:35:27.000000000 -0700 +++ src/plugins/platforms/cocoa/qcocoahelpers.mm 2017-09-22 23:17:01.000000000 -0700 @@ -668,15 +668,8 @@ 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); @@ -684,10 +677,6 @@ CGContextDrawImage(inContext, *inBounds, inImage); CGContextRestoreGState(inContext); -InvalidImage: -InvalidBounds: -InvalidContext: - return err; } Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) --- src/plugins/platforms/cocoa/qcocoahelpers.h.orig 2015-10-12 21:35:27.000000000 -0700 +++ src/plugins/platforms/cocoa/qcocoahelpers.h 2017-09-22 23:15:59.000000000 -0700 @@ -78,7 +78,7 @@ // Creates a mutable shape, it's the caller's responsibility to release. HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion); -OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); +void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); QChar qt_mac_qtKey2CocoaKey(Qt::Key key); Qt::Key qt_mac_cocoaKey2QtKey(QChar keyCode);