Client: Accept prioritized list of shell integrations

[ChangeLog][QPA plugin] QT_WAYLAND_SHELL_INTEGRATION environment variable
now accepts a semicolon-separated list of shell integrations.

Change-Id: I91364f53ea584bfbd9693b5ea58df07226c3e2c6
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Paul Olav Tvete 2018-05-29 15:20:39 +02:00
parent 796b02d398
commit e6a0a0ce53

View File

@ -381,12 +381,12 @@ void QWaylandIntegration::initializeShellIntegration()
{
mShellIntegrationInitialized = true;
QByteArray integrationName = qgetenv("QT_WAYLAND_SHELL_INTEGRATION");
QString targetKey = QString::fromLocal8Bit(integrationName);
QByteArray integrationNames = qgetenv("QT_WAYLAND_SHELL_INTEGRATION");
QString targetKeys = QString::fromLocal8Bit(integrationNames);
QStringList preferredShells;
if (!targetKey.isEmpty()) {
preferredShells << targetKey;
if (!targetKeys.isEmpty()) {
preferredShells = targetKeys.split(QLatin1Char(';'));
} else {
preferredShells << QLatin1String("xdg-shell");
preferredShells << QLatin1String("xdg-shell-v6");