From a84d893bae6b282381f9e1c55a34cd223d7351ed Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 17 Jan 2012 14:40:35 +0100 Subject: Add "nswindow" resource to the Cocoa native interface implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will return the NSWindow* for the given QWindow*. Port the QWidget autotest helper to use the native interface and the "nswindow" resource. Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234 Reviewed-by: João Abecasis Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 426ac1e494..2f393cb1b9 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -61,6 +61,8 @@ void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceS return static_cast(window->handle())->currentContext()->nsOpenGLContext(); } else if (resourceString == "nsview") { return static_cast(window->handle())->m_contentView; + } else if (resourceString == "nswindow") { + return static_cast(window->handle())->m_nsWindow; } return 0; } -- cgit v1.2.3