From 6b7e6332484df1d16ad539631685687f76f86159 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 23 Sep 2016 16:15:36 -0700 Subject: Remove compatibility code paths for macOS < 10.10 and iOS < 8.0 Change-Id: I11bec0efc2b4d86adf64a58990260fee70f050ac Reviewed-by: Richard Moe Gustavsen --- src/gui/painting/qcoregraphics.mm | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/gui/painting/qcoregraphics.mm') 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]; -- cgit v1.2.3