diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-05 15:20:47 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-10-05 19:35:06 +0000 |
commit | 087b11e881032bbd7bc1cbc06c45480c22ecb714 (patch) | |
tree | ad7a3bf997521877ea957a980429306fc7e738ca /src/plugins/platforms/cocoa/qcocoanativeinterface.mm | |
parent | 12bc984f653a06fcc87d5d5615c976f6e3d1a080 (diff) |
macOS: Rename m_contentView to m_view, to distinguish from [NSWindow contentView]
The contentView is the root view of a NSWindow, but our m_contentView is
just the corresponding NSView of a QWindow, and doesn't always match the
contentView property of the NSWindow.
This is part of a multi part cleanup to the Cocoa platform plugin in
preparation for improved foreign-window support.
Change-Id: Ifaffb12f35544ec05e4a83964b346b47fa4b0576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoanativeinterface.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 3ff37a8463..71d0cccde1 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -96,7 +96,7 @@ void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceS return 0; if (resourceString == "nsview") { - return static_cast<QCocoaWindow *>(window->handle())->m_contentView; + return static_cast<QCocoaWindow *>(window->handle())->m_view; #ifndef QT_NO_OPENGL } else if (resourceString == "nsopenglcontext") { return static_cast<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext(); @@ -281,7 +281,7 @@ QImage QCocoaNativeInterface::cgImageToQImage(CGImageRef image) void QCocoaNativeInterface::setWindowContentView(QPlatformWindow *window, void *contentView) { QCocoaWindow *cocoaPlatformWindow = static_cast<QCocoaWindow *>(window); - cocoaPlatformWindow->setContentView(reinterpret_cast<NSView *>(contentView)); + cocoaPlatformWindow->setView(reinterpret_cast<NSView *>(contentView)); } void QCocoaNativeInterface::setEmbeddedInForeignView(QPlatformWindow *window, bool embedded) |