From 35a0beb8a800c1b0a8460fc7a6a2c8d3a2d16bb8 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 5 Jan 2020 00:46:54 +0100 Subject: [PATCH] Replace use of QtMac::toCGImageRef with QImage::toCGImage --- 3rdparty/qocoa/qocoa_mac.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/3rdparty/qocoa/qocoa_mac.h b/3rdparty/qocoa/qocoa_mac.h index 35a9deb1d..548490a48 100644 --- a/3rdparty/qocoa/qocoa_mac.h +++ b/3rdparty/qocoa/qocoa_mac.h @@ -24,8 +24,9 @@ THE SOFTWARE. #include #include #include +#include +#include #include -#include static inline NSString* fromQString(const QString &string) { @@ -43,7 +44,7 @@ static inline QString toQString(NSString *string) static inline NSImage* fromQPixmap(const QPixmap &pixmap) { - CGImageRef cgImage = QtMac::toCGImageRef(pixmap); + CGImageRef cgImage = pixmap.toImage().toCGImage(); return [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize]; }