summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2024-04-10 12:34:44 +0200
committerMichael BrĂ¼ning <michael.bruning@qt.io>2024-04-12 13:06:52 +0200
commit63d4e58009c7f069ace14b64f1528ba2664272e9 (patch)
tree8820f3078b28d56f0913dd90e0222aea2d04934e /src
parent2a380a997ca6a5c4d1d2b531831d392877389f99 (diff)
Fix build errors with -no-opengl configuration5.15
Add the proper compile time guards around the usages of OpenGL specific methods that were missing them. Fixes: QTBUG-123058 Change-Id: If9545b7565b69c7a4c5d183754b3750a3c6c1298 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src')
-rw-r--r--src/core/compositor/content_gpu_client_qt.cpp2
-rw-r--r--src/core/ozone/gl_context_qt.cpp4
-rw-r--r--src/core/web_engine_context.cpp4
3 files changed, 8 insertions, 2 deletions
diff --git a/src/core/compositor/content_gpu_client_qt.cpp b/src/core/compositor/content_gpu_client_qt.cpp
index 8d7d5bce5..2c0f78548 100644
--- a/src/core/compositor/content_gpu_client_qt.cpp
+++ b/src/core/compositor/content_gpu_client_qt.cpp
@@ -52,9 +52,11 @@
#include <QGuiApplication>
#include <qpa/qplatformnativeinterface.h>
+#if QT_CONFIG(opengl)
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace QtWebEngineCore {
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 9a24f6bf4..0e7213a3a 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -51,8 +51,10 @@
#endif
QT_BEGIN_NAMESPACE
-
+#if QT_CONFIG(opengl)
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+#endif
+
GLContextHelper* GLContextHelper::contextHelper = 0;
namespace {
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index eb459fbdc..184f78c3b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -637,6 +637,7 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing);
+#if QT_CONFIG(opengl)
#if defined(Q_OS_WIN)
// This switch is used in Chromium's gl_context_wgl.cc file to determine whether to create
// an OpenGL Core Profile context. If the switch is not set, it would always try to create a
@@ -659,7 +660,8 @@ WebEngineContext::WebEngineContext()
if (isDesktopGLOrSoftware || isGLES2Context)
parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext);
-#endif
+#endif // defined(Q_OS_WIN)
+#endif // QT_CONFIG(opengl)
// Do not advertise a feature we have removed at compile time
parsedCommandLine->AppendSwitch(switches::kDisableSpeechAPI);