diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2016-11-29 10:46:50 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-12-01 11:15:16 +0000 |
commit | 16e3472de276d5f0d5bab9ef7d9aec1031d68d58 (patch) | |
tree | 80497d27039096d0cc8da7db36cfe33a337f4694 | |
parent | 04bf324fe80a81359c3e8aa6d25d56374c3d19ff (diff) |
Fix build with -no-opengl configured Qt
Commit e2541ebdfadea0fe43baac748cfa9e07f3b57215 introduced an unguarded
reference to QOpenGLContext. Guard it with the appropriate flags.
Task-number: QTBUG-57374
Change-Id: Ic9f0cc3c99aabd52813d8b828f1a51ca6871d4b4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp | 5 |
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) |