summaryrefslogtreecommitdiffstats
path: root/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-11 10:01:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-11 10:53:06 +0200
commit7978feadee937299798372bced1680f52b4b1842 (patch)
treebb844daade8c195c0a963f4663c2a0f880bd840a /src/webengine/render_widget_host_view_qt_delegate_quick.cpp
parent56ceccc4d4ff395983c4a2fbbe12fe8cb591cfb5 (diff)
parent56955e73d4be21bc3f086d1c805352a96944a25c (diff)
Merge branch '5.6' into 5.7
Diffstat (limited to 'src/webengine/render_widget_host_view_qt_delegate_quick.cpp')
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 1101bd483..9ad86800c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -66,14 +66,19 @@ RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderW
setActiveFocusOnTab(true);
#ifdef Q_OS_OSX
- // Check that the default QSurfaceFormat OpenGL profile matches the global OpenGL shared
- // context profile, otherwise this could lead to a nasty crash.
+ // Check that the default QSurfaceFormat OpenGL profile is compatible with the global OpenGL
+ // shared context profile, otherwise this could lead to a nasty crash.
QOpenGLContext *globalSharedContext = QOpenGLContext::globalShareContext();
if (globalSharedContext) {
QSurfaceFormat sharedFormat = globalSharedContext->format();
QSurfaceFormat defaultFormat = QSurfaceFormat::defaultFormat();
- if (defaultFormat.profile() != sharedFormat.profile()) {
- qFatal("QWebEngine: Default QSurfaceFormat OpenGL profile does not match global shared context OpenGL profile. Please make sure you set a new QSurfaceFormat before the QtGui application instance is created.");
+
+ if (defaultFormat.profile() != sharedFormat.profile()
+ && defaultFormat.profile() == QSurfaceFormat::CoreProfile
+ && defaultFormat.version() >= qMakePair(3, 2)) {
+ qFatal("QWebEngine: Default QSurfaceFormat OpenGL profile is not compatible with the "
+ "global shared context OpenGL profile. Please make sure you set a compatible "
+ "QSurfaceFormat before the QtGui application instance is created.");
}
}
#endif