--- src/gui/painting/qcoregraphics.mm.orig 2017-01-18 07:20:58.000000000 -0700 +++ src/gui/painting/qcoregraphics.mm 2017-09-25 15:59:30.000000000 -0700 @@ -65,17 +65,8 @@ image.bytesPerLine(), dataProvider, NULL, false); } -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; - -#ifdef Q_OS_MACOS - require_action(inContext != NULL, InvalidContext, err = paramErr); - require_action(inBounds != NULL, InvalidBounds, err = paramErr); - require_action(inImage != NULL, InvalidImage, err = paramErr); -#endif - CGContextSaveGState( inContext ); CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds)); CGContextScaleCTM(inContext, 1, -1); @@ -83,13 +74,6 @@ CGContextDrawImage(inContext, *inBounds, inImage); CGContextRestoreGState(inContext); - -#ifdef Q_OS_MACOS -InvalidImage: -InvalidBounds: -InvalidContext: -#endif - return err; } QImage qt_mac_toQImage(CGImageRef image) --- src/gui/painting/qcoregraphics_p.h.orig 2017-01-18 07:20:58.000000000 -0700 +++ src/gui/painting/qcoregraphics_p.h 2017-09-25 16:00:17.000000000 -0700 @@ -65,7 +65,7 @@ Q_GUI_EXPORT CGImageRef qt_mac_toCGImageMask(const QImage &qImage); Q_GUI_EXPORT QImage qt_mac_toQImage(CGImageRef image); -Q_GUI_EXPORT OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); +Q_GUI_EXPORT void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); Q_GUI_EXPORT CGColorSpaceRef qt_mac_genericColorSpace(); Q_GUI_EXPORT CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice);