From 7a7fe9dbb3be042b42a559e734df40ffdea7ebbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 16 Jul 2019 23:19:19 +0200 Subject: macOS: Move QCocoaGLContext initialization into dedicated method Change-Id: I9dc2c400c3d26e9fcfaac04b61c1503229f59dba Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (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 b5d63f8331..dd2d1ba0f1 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -418,9 +418,7 @@ QPlatformOffscreenSurface *QCocoaIntegration::createPlatformOffscreenSurface(QOf #ifndef QT_NO_OPENGL QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { - QCocoaGLContext *glContext = new QCocoaGLContext(context); - context->setNativeHandle(QVariant::fromValue(glContext->nativeContext())); - return glContext; + return new QCocoaGLContext(context); } #endif -- cgit v1.2.3