diff --git src/gui/painting/qcoregraphics.mm src/gui/painting/qcoregraphics.mm
index c4fb8afc64eef280652208c3c4bf67f9a7b5c237..5d95014b94297c534973dca91c3e869bb86887a2 100644
|
|
QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size) |
147 | 147 | QMacCGContext ctx(&pixmap); |
148 | 148 | if (!ctx) |
149 | 149 | return QPixmap(); |
150 | | NSGraphicsContext *gc = [NSGraphicsContext graphicsContextWithCGContext:ctx flipped:YES]; |
| 150 | NSGraphicsContext *gc; |
| 151 | #if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_10, __IPHONE_NA) |
| 152 | if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_10) |
| 153 | gc = [NSGraphicsContext graphicsContextWithCGContext:ctx flipped:YES]; |
| 154 | else |
| 155 | #endif |
| 156 | gc = [NSGraphicsContext graphicsContextWithGraphicsPort:ctx flipped:YES]; |
151 | 157 | if (!gc) |
152 | 158 | return QPixmap(); |
153 | 159 | [NSGraphicsContext saveGraphicsState]; |