From 881078d7b5331d62fa52021eae24c115fab87861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 1 Aug 2018 12:43:16 +0200 Subject: 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 --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm') 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 #include +#include + #include #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(glContext->nativeContext())); return glContext; } #endif -- cgit v1.2.3