QOpenGLContext: Use static invocation of QGuiApplication::platformNativeInterface().

Fix MSVC warning (release build):
qopenglcontext.cpp(1116) : warning C4189: 'app' : local variable is initialized but not referenced

Change-Id: I00fa5237bbac4c0e3bb63ea9d3e5096e05dbe1be
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
bb10
Friedemann Kleint 2014-12-17 08:54:11 +01:00
parent dd91e1bc4d
commit c07559bf5b
1 changed files with 3 additions and 3 deletions

View File

@ -1113,9 +1113,9 @@ void QOpenGLContext::deleteQGLContext()
void *QOpenGLContext::openGLModuleHandle()
{
#ifdef QT_OPENGL_DYNAMIC
QGuiApplication *app = qGuiApp;
Q_ASSERT(app);
return app->platformNativeInterface()->nativeResourceForIntegration(QByteArrayLiteral("glhandle"));
QPlatformNativeInterface *ni = QGuiApplication::platformNativeInterface();
Q_ASSERT(ni);
return ni->nativeResourceForIntegration(QByteArrayLiteral("glhandle"));
#else
return 0;
#endif