summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.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/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
parent56ceccc4d4ff395983c4a2fbbe12fe8cb591cfb5 (diff)
parent56955e73d4be21bc3f086d1c805352a96944a25c (diff)
Merge branch '5.6' into 5.7
Diffstat (limited to 'src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp')
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 161983b70..3f70187e7 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -77,11 +77,16 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
QSurfaceFormat sharedFormat = globalSharedContext->format();
#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.
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