From c85603385130703f9a24dd4d80978c70888d3ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 May 2020 20:25:23 +0200 Subject: [PATCH] Remove QPlatformNativeInterface functions for CGImage conversion QMacExtras no longer use them. Clients who need the functionality should use QImage::toCGImage(), or qt_mac_toQImage() from QtGui's private qcoregraphics_p.h, until we've made a public verion of it. Task-number: QTBUG-83252 Change-Id: If74d05afe8f4ce6728d8c503bd97f7632583fbed Reviewed-by: Volker Hilsheimer Reviewed-by: Timur Pocheptsov --- .../platforms/cocoa/qcocoanativeinterface.h | 4 ---- .../platforms/cocoa/qcocoanativeinterface.mm | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h index c78f1d5a7f..70d25e345a 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h @@ -118,10 +118,6 @@ private: // Function to return NSMenu * from QPlatformMenuBar static void *qMenuBarToNSMenu(QPlatformMenuBar *platformMenuBar); - // QImage <-> CGImage conversion functions - static CGImageRef qImageToCGImage(const QImage &image); - static QImage cgImageToQImage(CGImageRef image); - // Set a QWindow as a "guest" (subwindow) of a non-QWindow static void setEmbeddedInForeignView(QPlatformWindow *window, bool embedded); diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 90e124b790..8e336d9ee7 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -127,10 +127,6 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInter return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qMenuToNSMenu); if (resource.toLower() == "qmenubartonsmenu") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qMenuBarToNSMenu); - if (resource.toLower() == "qimagetocgimage") - return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qImageToCGImage); - if (resource.toLower() == "cgimagetoqimage") - return NativeResourceForIntegrationFunction(QCocoaNativeInterface::cgImageToQImage); if (resource.toLower() == "registertouchwindow") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerTouchWindow); if (resource.toLower() == "setembeddedinforeignview") @@ -279,16 +275,6 @@ void *QCocoaNativeInterface::qMenuBarToNSMenu(QPlatformMenuBar *platformMenuBar) return reinterpret_cast(menu); } -CGImageRef QCocoaNativeInterface::qImageToCGImage(const QImage &image) -{ - return qt_mac_toCGImage(image); -} - -QImage QCocoaNativeInterface::cgImageToQImage(CGImageRef image) -{ - return qt_mac_toQImage(image); -} - void QCocoaNativeInterface::setEmbeddedInForeignView(QPlatformWindow *window, bool embedded) { Q_UNUSED(embedded); // "embedded" state is now automatically detected