a11y: add runtime checking for xcb only calls
This amends d23562da1c4cb525d4012bee55bd665c6cafef04 . Pick-to: 6.5 Task-number: QTBUG-117535 Change-Id: I33f97f3c26409a33c8a069f9dcdfe61bbd88e2ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 7e14e6c2d3bb5297eefa273d5a23836c931c7517) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b3cd75fde7
commit
efbcd59795
@ -56,6 +56,7 @@ DBusConnection::DBusConnection(QObject *parent)
|
|||||||
if (c.interface()->isServiceRegistered(A11Y_SERVICE))
|
if (c.interface()->isServiceRegistered(A11Y_SERVICE))
|
||||||
serviceRegistered();
|
serviceRegistered();
|
||||||
|
|
||||||
|
if (QGuiApplication::platformName().startsWith("xcb"_L1)) {
|
||||||
// In addition try if there is an xatom exposing the bus address, this allows applications run as root to work
|
// In addition try if there is an xatom exposing the bus address, this allows applications run as root to work
|
||||||
QString address = getAddressFromXCB();
|
QString address = getAddressFromXCB();
|
||||||
if (!address.isEmpty()) {
|
if (!address.isEmpty()) {
|
||||||
@ -63,6 +64,7 @@ DBusConnection::DBusConnection(QObject *parent)
|
|||||||
connectA11yBus(address);
|
connectA11yBus(address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString DBusConnection::getAddressFromXCB()
|
QString DBusConnection::getAddressFromXCB()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user