diff --git a/src/widgets/qocoa_mac.h b/src/widgets/qocoa_mac.h index 1a58e3523..50375bbd6 100644 --- a/src/widgets/qocoa_mac.h +++ b/src/widgets/qocoa_mac.h @@ -22,9 +22,11 @@ THE SOFTWARE. #include #include +#include #include +#include +#include #include -#include #include static inline NSString* fromQString(const QString &string) { @@ -44,7 +46,8 @@ static inline QString toQString(NSString *string) { static inline NSImage* fromQPixmap(const QPixmap &pixmap) { - CGImageRef cgImage = QtMac::toCGImageRef(pixmap); + QImage image = pixmap.toImage(); + CGImageRef cgImage = image.toCGImage(); return [ [NSImage alloc] initWithCGImage:cgImage size:NSZeroSize]; }