Respect AT_SPI_BUS_ADDRESS env var on Linux
Change-Id: Ic277b5ebe2d752360cebdb2ff728ca219f9d7124 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
This commit is contained in:
parent
669f0e92aa
commit
8c77825bb7
@ -69,6 +69,14 @@ QT_BEGIN_NAMESPACE
|
||||
DBusConnection::DBusConnection(QObject *parent)
|
||||
: QObject(parent), m_a11yConnection(QString()), m_enabled(false)
|
||||
{
|
||||
// If the bus is explicitly set via env var it overrides everything else.
|
||||
QByteArray addressEnv = qgetenv("AT_SPI_BUS_ADDRESS");
|
||||
if (!addressEnv.isEmpty()) {
|
||||
m_enabled = true;
|
||||
connectA11yBus(QString::fromLocal8Bit(addressEnv));
|
||||
return;
|
||||
}
|
||||
|
||||
// Start monitoring if "org.a11y.Bus" is registered as DBus service.
|
||||
QDBusConnection c = QDBusConnection::sessionBus();
|
||||
if (!c.isConnected()) {
|
||||
|
Loading…
Reference in New Issue
Block a user