summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp')
-rw-r--r--src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
index bf3514f71..a39c0e483 100644
--- a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
+++ b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
@@ -49,10 +49,13 @@ namespace QtWebEngineCore
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_OPENGL
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+#endif
static void initialize()
{
+#ifndef QT_NO_OPENGL
if (QCoreApplication::instance()) {
//On window/ANGLE, calling QtWebEngine::initialize from DllMain will result in a crash.
if (!qt_gl_global_share_context()) {
@@ -62,9 +65,9 @@ static void initialize()
}
return;
}
-
//QCoreApplication is not yet instantiated, ensuring the call will be deferred
qAddPreRoutine(QtWebEngineCore::initialize);
+#endif // QT_NO_OPENGL
}
Q_CONSTRUCTOR_FUNCTION(initialize)