summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-10-15 13:38:17 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-10-16 11:36:33 +0000
commitfbfd6b7617a88bf9668f88be5db220d3a3f92071 (patch)
treeca786c07da9f36e2673bed09691129bd2714e179
parent7e6ef9548432e96deff0c8e525f5db26b301c9ec (diff)
Set Qt::AA_ShareOpenGLContexts in QtWebEngine::initialize()
QtWebEngine::initialize() does the same as passing AA_ShareOpenGLContexts to the QCoreApplication constructor, so it should also behave the same. Other Qt classes (e.g. QOpenGLWidget) actually check for the attribute to adapt. Change-Id: I6068a9a3f5736c708944d69c0df853143c3e9dd1 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--src/webengine/api/qtwebengineglobal.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp
index db9d7552d..07561be6e 100644
--- a/src/webengine/api/qtwebengineglobal.cpp
+++ b/src/webengine/api/qtwebengineglobal.cpp
@@ -107,6 +107,9 @@ void initialize()
shareContext->create();
qAddPostRoutine(deleteShareContext);
qt_gl_set_global_share_context(shareContext);
+
+ // Classes like QOpenGLWidget check for the attribute
+ app->setAttribute(Qt::AA_ShareOpenGLContexts);
}
} // namespace QtWebEngine