summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-01-17 14:40:35 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-19 11:31:22 +0100
commita84d893bae6b282381f9e1c55a34cd223d7351ed (patch)
tree7af52d91463db5507269eefd82b2da28c13df272 /src
parente87813bfa239e2083bda5ecc8172753ecc8de5f1 (diff)
Add "nswindow" resource to the Cocoa native interface implementation
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 <joao.abecasis@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm2
1 files changed, 2 insertions, 0 deletions
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<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext();
} else if (resourceString == "nsview") {
return static_cast<QCocoaWindow *>(window->handle())->m_contentView;
+ } else if (resourceString == "nswindow") {
+ return static_cast<QCocoaWindow *>(window->handle())->m_nsWindow;
}
return 0;
}