diff options
-rw-r--r-- | src/macextras/qmacfunctions.mm | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/macextras/qmacfunctions.mm b/src/macextras/qmacfunctions.mm index 9d0b75c..5250971 100644 --- a/src/macextras/qmacfunctions.mm +++ b/src/macextras/qmacfunctions.mm @@ -52,6 +52,8 @@ #import <CoreGraphics/CoreGraphics.h> #endif +#include <QtGui/private/qcoregraphics_p.h> + QT_BEGIN_NAMESPACE /*! @@ -81,17 +83,7 @@ namespace QtMac */ QPixmap fromCGImageRef(CGImageRef image) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) - QPlatformNativeInterface::NativeResourceForIntegrationFunction function = resolvePlatformFunction("cgimagetoqimage"); - if (function) { - typedef QImage (*CGImageToQImageFunction)(CGImageRef image); - return QPixmap::fromImage(reinterpret_cast<CGImageToQImageFunction>(function)(image)); - } - - return QPixmap(); -#else - return QPixmap::fromCGImageRef(image); -#endif + return QPixmap::fromImage(qt_mac_toQImage(image)); } } // namespace QtMac |