diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-11 10:01:36 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-11 10:53:06 +0200 |
commit | 7978feadee937299798372bced1680f52b4b1842 (patch) | |
tree | bb844daade8c195c0a963f4663c2a0f880bd840a /src/webengine/render_widget_host_view_qt_delegate_quick.cpp | |
parent | 56ceccc4d4ff395983c4a2fbbe12fe8cb591cfb5 (diff) | |
parent | 56955e73d4be21bc3f086d1c805352a96944a25c (diff) |
Merge branch '5.6' into 5.7
Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
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.cpp | 13 |
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 |