Guest User

Untitled

a guest
Nov 24th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. diff --git a/qtbase/src/gui/painting/qcoregraphics.mm b/qtbase/src/gui/painting/qcoregraphics.mm
  2. index 98fdd7f35e..c4fb8afc64 100644
  3. --- a/qtbase/src/gui/painting/qcoregraphics.mm
  4. +++ b/qtbase/src/gui/painting/qcoregraphics.mm
  5. @@ -72,17 +72,8 @@ CGImageRef qt_mac_toCGImageMask(const QImage &image)
  6. image.bytesPerLine(), dataProvider, NULL, false);
  7. }
  8.  
  9. -OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
  10. +void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
  11. {
  12. - // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
  13. - OSStatus err = noErr;
  14. -
  15. -#ifdef Q_OS_MACOS
  16. - require_action(inContext != NULL, InvalidContext, err = paramErr);
  17. - require_action(inBounds != NULL, InvalidBounds, err = paramErr);
  18. - require_action(inImage != NULL, InvalidImage, err = paramErr);
  19. -#endif
  20. -
  21. CGContextSaveGState( inContext );
  22. CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
  23. CGContextScaleCTM(inContext, 1, -1);
  24. @@ -90,13 +81,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm
  25. CGContextDrawImage(inContext, *inBounds, inImage);
  26.  
  27. CGContextRestoreGState(inContext);
  28. -
  29. -#ifdef Q_OS_MACOS
  30. -InvalidImage:
  31. -InvalidBounds:
  32. -InvalidContext:
  33. -#endif
  34. - return err;
  35. }
  36.  
  37. QImage qt_mac_toQImage(CGImageRef image)
  38. diff --git a/qtbase/src/gui/painting/qcoregraphics_p.h b/qtbase/src/gui/painting/qcoregraphics_p.h
  39. index 54de3f332e..d74c4d0711 100644
  40. --- a/qtbase/src/gui/painting/qcoregraphics_p.h
  41. +++ b/qtbase/src/gui/painting/qcoregraphics_p.h
  42. @@ -71,7 +71,7 @@ Q_GUI_EXPORT CGImageRef qt_mac_toCGImage(const QImage &qImage);
  43. Q_GUI_EXPORT CGImageRef qt_mac_toCGImageMask(const QImage &qImage);
  44. Q_GUI_EXPORT QImage qt_mac_toQImage(CGImageRef image);
  45.  
  46. -Q_GUI_EXPORT OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
  47. +Q_GUI_EXPORT void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
  48.  
  49. Q_GUI_EXPORT CGColorSpaceRef qt_mac_genericColorSpace();
  50. Q_GUI_EXPORT CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice);
  51. --
  52. 2.14.2
Add Comment
Please, Sign In to add comment