Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
3.7KB

  1. From 0707260a4f8e64dfadf1df5f935e74cabb7c7d27 Mon Sep 17 00:00:00 2001
  2. From: Jake Petroules <jake.petroules@qt.io>
  3. Date: Sun, 1 Oct 2017 21:48:17 -0700
  4. Subject: [PATCH] Fix build error with macOS 10.13 SDK
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=utf8
  7. Content-Transfer-Encoding: 8bit
  8. Several of these variables/macros are no longer defined. We didn't
  9. validate the preconditions on iOS, tvOS, or watchOS, so no
  10. need to bother validating them on macOS either. Nor did we check the
  11. OSStatus result on any platform anyways.
  12. Task-number: QTBUG-63401
  13. Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3
  14. (cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b)
  15. Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
  16. Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
  17. ---
  18. src/plugins/platforms/cocoa/qcocoahelpers.h | 2 +-
  19. src/plugins/platforms/cocoa/qcocoahelpers.mm | 13 +------------
  20. 2 files changed, 2 insertions(+), 13 deletions(-)
  21. diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h
  22. index bbb3793..74371d5 100644
  23. --- a/src/plugins/platforms/cocoa/qcocoahelpers.h
  24. +++ b/src/plugins/platforms/cocoa/qcocoahelpers.h
  25. @@ -80,7 +80,7 @@ QColor qt_mac_toQColor(CGColorRef color);
  26. // Creates a mutable shape, it's the caller's responsibility to release.
  27. HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion &region);
  28. -OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
  29. +void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
  30. NSDragOperation qt_mac_mapDropAction(Qt::DropAction action);
  31. NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions);
  32. diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
  33. index cd73148..3f8429e 100644
  34. --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
  35. +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
  36. @@ -544,15 +544,8 @@ NSRect qt_mac_flipRect(const QRect &rect)
  37. return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height());
  38. }
  39. -OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
  40. +void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
  41. {
  42. - // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
  43. - OSStatus err = noErr;
  44. -
  45. - require_action(inContext != NULL, InvalidContext, err = paramErr);
  46. - require_action(inBounds != NULL, InvalidBounds, err = paramErr);
  47. - require_action(inImage != NULL, InvalidImage, err = paramErr);
  48. -
  49. CGContextSaveGState( inContext );
  50. CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
  51. CGContextScaleCTM(inContext, 1, -1);
  52. @@ -560,10 +553,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm
  53. CGContextDrawImage(inContext, *inBounds, inImage);
  54. CGContextRestoreGState(inContext);
  55. -InvalidImage:
  56. -InvalidBounds:
  57. -InvalidContext:
  58. - return err;
  59. }
  60. Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
  61. --
  62. 2.7.4
  63. diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
  64. index 7e1dfd9..674c037 100644
  65. --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
  66. +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
  67. @@ -736,7 +736,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl
  68. QFixed QCoreTextFontEngine::emSquareSize() const
  69. {
  70. - return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
  71. + return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
  72. }
  73. QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const