diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index a83dec4e644..5e7a452a335 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -49,7 +49,7 @@ using namespace Qt::StringLiterals; Q_LOGGING_CATEGORY(lcAccessibilityAtspi, "qt.accessibility.atspi") Q_LOGGING_CATEGORY(lcAccessibilityAtspiCreation, "qt.accessibility.atspi.creation") -AtSpiAdaptor::AtSpiAdaptor(DBusConnection *connection, QObject *parent) +AtSpiAdaptor::AtSpiAdaptor(QAtSpiDBusConnection *connection, QObject *parent) : QDBusVirtualObject(parent), m_dbus(connection) , sendFocus(0) , sendObject(0) diff --git a/src/gui/accessible/linux/atspiadaptor_p.h b/src/gui/accessible/linux/atspiadaptor_p.h index 68a455e7cb7..fe7f6c477c2 100644 --- a/src/gui/accessible/linux/atspiadaptor_p.h +++ b/src/gui/accessible/linux/atspiadaptor_p.h @@ -38,7 +38,7 @@ class AtSpiAdaptor :public QDBusVirtualObject Q_OBJECT public: - explicit AtSpiAdaptor(DBusConnection *connection, QObject *parent = nullptr); + explicit AtSpiAdaptor(QAtSpiDBusConnection *connection, QObject *parent = nullptr); ~AtSpiAdaptor(); void registerApplication(); @@ -114,7 +114,7 @@ public Q_SLOTS: // private vars QSpiObjectReference accessibilityRegistry; - DBusConnection *m_dbus; + QAtSpiDBusConnection *m_dbus; QSpiApplicationAdaptor *m_applicationAdaptor; /// Assigned from the accessibility registry. diff --git a/src/gui/accessible/linux/dbusconnection.cpp b/src/gui/accessible/linux/dbusconnection.cpp index 10bd10927ec..620575cc989 100644 --- a/src/gui/accessible/linux/dbusconnection.cpp +++ b/src/gui/accessible/linux/dbusconnection.cpp @@ -26,13 +26,13 @@ using namespace Qt::StringLiterals; #define A11Y_PATH "/org/a11y/bus"_L1 /*! - \class DBusConnection + \class QAtSpiDBusConnection \internal \brief Connects to the accessibility dbus. This is usually a different bus from the session bus. */ -DBusConnection::DBusConnection(QObject *parent) +QAtSpiDBusConnection::QAtSpiDBusConnection(QObject *parent) : QObject(parent), m_a11yConnection(QString()), m_enabled(false) { // If the bus is explicitly set via env var it overrides everything else. @@ -66,7 +66,7 @@ DBusConnection::DBusConnection(QObject *parent) } } -QString DBusConnection::getAddressFromXCB() +QString QAtSpiDBusConnection::getAddressFromXCB() { QGuiApplication *app = qobject_cast(QCoreApplication::instance()); if (!app) @@ -85,7 +85,7 @@ QString DBusConnection::getAddressFromXCB() // We have the a11y registry on the session bus. // Subscribe to updates about a11y enabled state. // Find out the bus address -void DBusConnection::serviceRegistered() +void QAtSpiDBusConnection::serviceRegistered() { // listen to enabled changes QDBusConnection c = QDBusConnection::sessionBus(); @@ -113,12 +113,12 @@ void DBusConnection::serviceRegistered() // connect(a11yStatus, ); QtDbus doesn't support notifications for property changes yet } -void DBusConnection::serviceUnregistered() +void QAtSpiDBusConnection::serviceUnregistered() { emit enabledChanged(false); } -void DBusConnection::connectA11yBus(const QString &address) +void QAtSpiDBusConnection::connectA11yBus(const QString &address) { if (address.isEmpty()) { qWarning("Could not find Accessibility DBus address."); @@ -130,7 +130,7 @@ void DBusConnection::connectA11yBus(const QString &address) emit enabledChanged(true); } -void DBusConnection::dbusError(const QDBusError &error) +void QAtSpiDBusConnection::dbusError(const QDBusError &error) { qWarning() << "Accessibility encountered a DBus error:" << error; } @@ -139,7 +139,7 @@ void DBusConnection::dbusError(const QDBusError &error) Returns the DBus connection that got established. Or an invalid connection if not yet connected. */ -QDBusConnection DBusConnection::connection() const +QDBusConnection QAtSpiDBusConnection::connection() const { return m_a11yConnection; } diff --git a/src/gui/accessible/linux/dbusconnection_p.h b/src/gui/accessible/linux/dbusconnection_p.h index 8b231c5ad01..98bd02741f8 100644 --- a/src/gui/accessible/linux/dbusconnection_p.h +++ b/src/gui/accessible/linux/dbusconnection_p.h @@ -27,12 +27,12 @@ QT_BEGIN_NAMESPACE class QDBusServiceWatcher; -class DBusConnection : public QObject +class QAtSpiDBusConnection : public QObject { Q_OBJECT public: - DBusConnection(QObject *parent = nullptr); + QAtSpiDBusConnection(QObject *parent = nullptr); QDBusConnection connection() const; bool isEnabled() const { return m_enabled; } diff --git a/src/gui/accessible/linux/qspiaccessiblebridge.cpp b/src/gui/accessible/linux/qspiaccessiblebridge.cpp index de2e7d5fc06..0d18589ac56 100644 --- a/src/gui/accessible/linux/qspiaccessiblebridge.cpp +++ b/src/gui/accessible/linux/qspiaccessiblebridge.cpp @@ -31,7 +31,7 @@ using namespace Qt::StringLiterals; QSpiAccessibleBridge::QSpiAccessibleBridge() : cache(nullptr), dec(nullptr), dbusAdaptor(nullptr) { - dbusConnection = new DBusConnection(); + dbusConnection = new QAtSpiDBusConnection(); connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool))); // Now that we have connected the signal, make sure we didn't miss a change, // e.g. when running as root or when AT_SPI_BUS_ADDRESS is set by hand. diff --git a/src/gui/accessible/linux/qspiaccessiblebridge_p.h b/src/gui/accessible/linux/qspiaccessiblebridge_p.h index 5ad48c5cc42..69c4feb7bf2 100644 --- a/src/gui/accessible/linux/qspiaccessiblebridge_p.h +++ b/src/gui/accessible/linux/qspiaccessiblebridge_p.h @@ -27,7 +27,7 @@ QT_REQUIRE_CONFIG(accessibility); QT_BEGIN_NAMESPACE -class DBusConnection; +class QAtSpiDBusConnection; class QSpiDBusCache; class AtSpiAdaptor; struct RoleNames; @@ -60,7 +60,7 @@ public Q_SLOTS: QSpiDBusCache *cache; DeviceEventControllerAdaptor *dec; AtSpiAdaptor *dbusAdaptor; - DBusConnection* dbusConnection; + QAtSpiDBusConnection* dbusConnection; SpiRoleMapping m_spiRoleMapping; };