DBusConnection: reuse pre-defined constat values where possible

Change-Id: Ie32a0e87b1eed2db104bb23d58e747e651e04e63
Pick-to: 6.3 6.2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Sona Kurazyan 2022-04-21 14:29:19 +02:00
parent f0a72abfe3
commit a7dc1e280b

View File

@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** This file is part of the QtGui module of the Qt Toolkit.
@ -136,9 +136,8 @@ void DBusConnection::serviceRegistered()
emit enabledChanged(m_enabled); emit enabledChanged(m_enabled);
} else { } else {
QDBusConnection c = QDBusConnection::sessionBus(); QDBusConnection c = QDBusConnection::sessionBus();
QDBusMessage m = QDBusMessage::createMethodCall(QLatin1String("org.a11y.Bus"), QDBusMessage m = QDBusMessage::createMethodCall(A11Y_SERVICE, A11Y_PATH, A11Y_SERVICE,
QLatin1String("/org/a11y/bus"), QLatin1String("GetAddress"));
QLatin1String("org.a11y.Bus"), QLatin1String("GetAddress"));
c.callWithCallback(m, this, SLOT(connectA11yBus(QString)), SLOT(dbusError(QDBusError))); c.callWithCallback(m, this, SLOT(connectA11yBus(QString)), SLOT(dbusError(QDBusError)));
} }
} }