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 09:05:49 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-04-11 15:33:49 +0000
commit22a550303618202135e58f5673e7b8935d578687 (patch)
tree560918164edd7b76a2a8b6246f6dbca0ee69cf9a /src/webengine/render_widget_host_view_qt_delegate_quick.cpp
parentf8ed4ca51333157170f0fc94e2deff0d91cf4833 (diff)
parent7978feadee937299798372bced1680f52b4b1842 (diff)
Merge "Merge branch '5.6' into 5.7" into refs/staging/5.7v5.7.0-beta1
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