summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaintegration.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-01 12:43:16 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-03 22:50:23 +0000
commit881078d7b5331d62fa52021eae24c115fab87861 (patch)
treebd99f066aee9d7525f63758f0ffc383c6b7085cd /src/plugins/platforms/cocoa/qcocoaintegration.mm
parentfed7876e205a34289891aeba51dd28b07606a59b (diff)
macOS: Disambiguate use of native handles in QCocoaGLContext
We only need the QVariant native handle when creating the context, so there's no need for a getter, and we then rename the NSOpenGLContext getter to match e.g. QCocoaScreen::nativeScreen(). Change-Id: I041e0eff39af9c8836d8ecd560ea07e92dc63e03 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 8ad76eb05e..d13d08d843 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -59,6 +59,8 @@
#include <qpa/qplatformoffscreensurface.h>
#include <QtCore/qcoreapplication.h>
+#include <QtPlatformHeaders/qcocoanativecontext.h>
+
#include <QtGui/private/qcoregraphics_p.h>
#ifdef QT_WIDGETS_LIB
@@ -361,7 +363,7 @@ QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLCo
QCocoaGLContext *glContext = new QCocoaGLContext(context->format(),
context->shareHandle(),
context->nativeHandle());
- context->setNativeHandle(glContext->nativeHandle());
+ context->setNativeHandle(QVariant::fromValue<QCocoaNativeContext>(glContext->nativeContext()));
return glContext;
}
#endif