From 7d19f3b647f4e5ac4b5f0d2278703476f5a9ed1c Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Wed, 10 Aug 2016 17:56:10 +0200 Subject: Fix building when QT_NO_OPENGL is defined Task-number: QTBUG-54327 Change-Id: I759598d56aa0a74b64092365b422a743fb508ac6 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- src/core/web_engine_context.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core/web_engine_context.cpp') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 368ad48e2..7fe8fb612 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -88,7 +88,9 @@ #include #include #include -#include +#ifndef QT_NO_OPENGL +# include +#endif #include #include #include @@ -96,9 +98,11 @@ using namespace QtWebEngineCore; +#ifndef QT_NO_OPENGL QT_BEGIN_NAMESPACE Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); QT_END_NAMESPACE +#endif namespace { @@ -115,6 +119,7 @@ void destroyContext() s_destroyed = true; } +#ifndef QT_NO_OPENGL bool usingANGLE() { #if defined(Q_OS_WIN) @@ -160,7 +165,7 @@ bool usingQtQuick2DRenderer() // Anything other than the default OpenGL device will need to render in 2D mode. return device != QLatin1String("default"); } - +#endif //QT_NO_OPENGL #if defined(ENABLE_PLUGINS) void dummyGetPluginCallback(const std::vector&) { @@ -318,6 +323,7 @@ WebEngineContext::WebEngineContext() GLContextHelper::initialize(); const char *glType = 0; +#ifndef QT_NO_OPENGL if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) { if (qt_gl_global_share_context()) { if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) { @@ -365,6 +371,7 @@ WebEngineContext::WebEngineContext() } } } +#endif if (glType) parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType); -- cgit v1.2.3