diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-09-23 16:15:36 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-01-09 10:11:48 +0000 |
commit | 6b7e6332484df1d16ad539631685687f76f86159 (patch) | |
tree | 721b4b8fadc18d690aa8df0bcf81662485d2b2b6 /src/gui/painting/qcoregraphics.mm | |
parent | 747e569597348b47a9d2cbb469eb5c4af87f7ff2 (diff) |
Remove compatibility code paths for macOS < 10.10 and iOS < 8.0
Change-Id: I11bec0efc2b4d86adf64a58990260fee70f050ac
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/painting/qcoregraphics.mm')
-rw-r--r-- | src/gui/painting/qcoregraphics.mm | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm index bf0be7f3d3..34dfd51204 100644 --- a/src/gui/painting/qcoregraphics.mm +++ b/src/gui/painting/qcoregraphics.mm @@ -107,29 +107,6 @@ QImage qt_mac_toQImage(CGImageRef image) #ifdef Q_OS_MACOS -QT_END_NAMESPACE - -@interface NSGraphicsContext (QtAdditions) - -+ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState; - -@end - -@implementation NSGraphicsContext (QtAdditions) - -+ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState -{ -#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_10, __IPHONE_NA) - if (QT_PREPEND_NAMESPACE(QOperatingSystemVersion::current()) >= QT_PREPEND_NAMESPACE(QOperatingSystemVersion::OSXYosemite)) - return [self graphicsContextWithCGContext:graphicsPort flipped:initialFlippedState]; -#endif - return [self graphicsContextWithGraphicsPort:graphicsPort flipped:initialFlippedState]; -} - -@end - -QT_BEGIN_NAMESPACE - static NSImage *qt_mac_cgimage_to_nsimage(CGImageRef image) { NSImage *newImage = [[NSImage alloc] initWithCGImage:image size:NSZeroSize]; @@ -178,7 +155,7 @@ QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size) QMacCGContext ctx(&pixmap); if (!ctx) return QPixmap(); - NSGraphicsContext *gc = [NSGraphicsContext qt_graphicsContextWithCGContext:ctx flipped:YES]; + NSGraphicsContext *gc = [NSGraphicsContext graphicsContextWithCGContext:ctx flipped:YES]; if (!gc) return QPixmap(); [NSGraphicsContext saveGraphicsState]; |