summaryrefslogtreecommitdiffstats
path: root/src/core/gl_context_qt.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-08-10 17:56:10 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-10-02 08:40:22 +0000
commit7d19f3b647f4e5ac4b5f0d2278703476f5a9ed1c (patch)
tree8f770c11fe270d71be7ab712ffc33df9d7bec53c /src/core/gl_context_qt.cpp
parent2ec47c9921a1e381943159f540b45c105d2ff1db (diff)
Fix building when QT_NO_OPENGL is defined
Task-number: QTBUG-54327 Change-Id: I759598d56aa0a74b64092365b422a743fb508ac6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/gl_context_qt.cpp')
-rw-r--r--src/core/gl_context_qt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
index bbcd3554d..b1177a998 100644
--- a/src/core/gl_context_qt.cpp
+++ b/src/core/gl_context_qt.cpp
@@ -63,11 +63,15 @@ namespace {
inline void *resourceForContext(const QByteArray &resource)
{
+#ifndef QT_NO_OPENGL
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}
return qApp->platformNativeInterface()->nativeResourceForContext(resource, shareContext);
+#else
+ return nullptr;
+#endif
}
inline void *resourceForIntegration(const QByteArray &resource)