summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-19 10:34:24 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-22 08:28:24 +0000
commit52c35c1ce798e6ec3aef86d5081d211cabe5daaf (patch)
tree3a8c6d06a1cf448462e29bc6320425744aebaad9 /src/plugins/platforms/xcb/qxcbconnection.cpp
parent03fd8fa46356a70c9eabcf7ca703ddaa5e16e96f (diff)
xcb: make it possible to disable gl integrations
By setting QT_XCB_GL_INTEGRATION to the special value "none", no plugins will be considered for loading. This matches what eglfs does with QT_QPA_EGLFS_INTEGRATION. This allows widget or raster-QWindow-only apps to start up faster by not spending time on plugin loading and potential initialization steps there. Task-number: QTBUG-46765 Change-Id: Ifeec3548a9b58f619a18e0be75fe4a9f489677a9 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 80c844e658..b8b665157b 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -532,9 +532,14 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
QStringList glIntegrationNames;
glIntegrationNames << QStringLiteral("xcb_glx") << QStringLiteral("xcb_egl");
QString glIntegrationName = QString::fromLocal8Bit(qgetenv("QT_XCB_GL_INTEGRATION"));
- if (glIntegrationName.size()) {
- glIntegrationNames.removeAll(glIntegrationName);
- glIntegrationNames.prepend(glIntegrationName);
+ if (!glIntegrationName.isEmpty()) {
+ qCDebug(QT_XCB_GLINTEGRATION) << "QT_XCB_GL_INTEGRATION is set to" << glIntegrationName;
+ if (glIntegrationName != QStringLiteral("none")) {
+ glIntegrationNames.removeAll(glIntegrationName);
+ glIntegrationNames.prepend(glIntegrationName);
+ } else {
+ glIntegrationNames.clear();
+ }
}
qCDebug(QT_XCB_GLINTEGRATION) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames;