diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 2bb8f205763..194e3e61448 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -667,7 +667,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const xml.append(tableCellIntrospection); if (interfaces.contains(ATSPI_DBUS_INTERFACE_VALUE ""_L1)) xml.append(valueIntrospection); - if (path == QSPI_OBJECT_PATH_ROOT ""_L1) + if (path == ATSPI_DBUS_PATH_ROOT ""_L1) xml.append(applicationIntrospection); return xml; @@ -913,7 +913,7 @@ bool AtSpiAdaptor::sendDBusSignal(const QString &path, const QString &interface, QAccessibleInterface *AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) const { - if (dbusPath == QSPI_OBJECT_PATH_ROOT ""_L1) + if (dbusPath == ATSPI_DBUS_PATH_ROOT ""_L1) return QAccessible::queryAccessibleInterface(qApp); QStringList parts = dbusPath.split(u'/'); @@ -1537,11 +1537,11 @@ bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const Q void AtSpiAdaptor::registerApplication() { OrgA11yAtspiSocketInterface *registry; - registry = new OrgA11yAtspiSocketInterface(QSPI_REGISTRY_NAME ""_L1, - QSPI_OBJECT_PATH_ROOT ""_L1, m_dbus->connection()); + registry = new OrgA11yAtspiSocketInterface(ATSPI_DBUS_NAME_REGISTRY ""_L1, + ATSPI_DBUS_PATH_ROOT ""_L1, m_dbus->connection()); QDBusPendingReply reply; - QSpiObjectReference ref = QSpiObjectReference(m_dbus->connection(), QDBusObjectPath(QSPI_OBJECT_PATH_ROOT)); + QSpiObjectReference ref = QSpiObjectReference(m_dbus->connection(), QDBusObjectPath(ATSPI_DBUS_PATH_ROOT)); reply = registry->Embed(ref); reply.waitForFinished(); // TODO: make this async if (reply.isValid ()) { @@ -1632,7 +1632,7 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS sendReply(connection, message, QVariant::fromValue(relationSet(interface, connection))); } else if (function == "GetApplication"_L1) { sendReply(connection, message, QVariant::fromValue( - QSpiObjectReference(connection, QDBusObjectPath(QSPI_OBJECT_PATH_ROOT)))); + QSpiObjectReference(connection, QDBusObjectPath(ATSPI_DBUS_PATH_ROOT)))); } else if (function == "GetChildren"_L1) { QSpiObjectReferenceArray children; const int numChildren = interface->childCount(); @@ -1749,7 +1749,7 @@ QString AtSpiAdaptor::pathForInterface(QAccessibleInterface *interface) const if (!interface || !interface->isValid()) return u"" ATSPI_DBUS_PATH_NULL ""_s; if (interface->role() == QAccessible::Application) - return u"" QSPI_OBJECT_PATH_ROOT ""_s; + return u"" ATSPI_DBUS_PATH_ROOT ""_s; QAccessible::Id id = QAccessible::uniqueId(interface); Q_ASSERT((int)id < 0); diff --git a/src/gui/accessible/linux/qspi_constant_mappings_p.h b/src/gui/accessible/linux/qspi_constant_mappings_p.h index ea571181e6f..d58e1445a22 100644 --- a/src/gui/accessible/linux/qspi_constant_mappings_p.h +++ b/src/gui/accessible/linux/qspi_constant_mappings_p.h @@ -28,46 +28,12 @@ QT_REQUIRE_CONFIG(accessibility); -// interface names from at-spi2-core/atspi/atspi-misc-private.h -#define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry" -#define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry" -#define ATSPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry" - -#define ATSPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root" - -#define ATSPI_DBUS_PATH_DEC "/org/a11y/atspi/registry/deviceeventcontroller" -#define ATSPI_DBUS_INTERFACE_DEC "org.a11y.atspi.DeviceEventController" -#define ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER "org.a11y.atspi.DeviceEventListener" - -#define ATSPI_DBUS_INTERFACE_CACHE "org.a11y.atspi.Cache" -#define ATSPI_DBUS_INTERFACE_ACCESSIBLE "org.a11y.atspi.Accessible" -#define ATSPI_DBUS_INTERFACE_ACTION "org.a11y.atspi.Action" -#define ATSPI_DBUS_INTERFACE_APPLICATION "org.a11y.atspi.Application" -#define ATSPI_DBUS_INTERFACE_COLLECTION "org.a11y.atspi.Collection" -#define ATSPI_DBUS_INTERFACE_COMPONENT "org.a11y.atspi.Component" -#define ATSPI_DBUS_INTERFACE_DOCUMENT "org.a11y.atspi.Document" -#define ATSPI_DBUS_INTERFACE_EDITABLE_TEXT "org.a11y.atspi.EditableText" -#define ATSPI_DBUS_INTERFACE_EVENT_KEYBOARD "org.a11y.atspi.Event.Keyboard" -#define ATSPI_DBUS_INTERFACE_EVENT_MOUSE "org.a11y.atspi.Event.Mouse" -#define ATSPI_DBUS_INTERFACE_EVENT_OBJECT "org.a11y.atspi.Event.Object" -#define ATSPI_DBUS_INTERFACE_HYPERLINK "org.a11y.atspi.Hyperlink" -#define ATSPI_DBUS_INTERFACE_HYPERTEXT "org.a11y.atspi.Hypertext" -#define ATSPI_DBUS_INTERFACE_IMAGE "org.a11y.atspi.Image" -#define ATSPI_DBUS_INTERFACE_SELECTION "org.a11y.atspi.Selection" -#define ATSPI_DBUS_INTERFACE_TABLE "org.a11y.atspi.Table" -#define ATSPI_DBUS_INTERFACE_TEXT "org.a11y.atspi.Text" -#define ATSPI_DBUS_INTERFACE_VALUE "org.a11y.atspi.Value" -#define ATSPI_DBUS_INTERFACE_SOCKET "org.a11y.atspi.Socket" - // missing from at-spi2-core: #define ATSPI_DBUS_INTERFACE_EVENT_WINDOW "org.a11y.atspi.Event.Window" #define ATSPI_DBUS_INTERFACE_EVENT_FOCUS "org.a11y.atspi.Event.Focus" #define QSPI_OBJECT_PATH_ACCESSIBLE "/org/a11y/atspi/accessible" #define QSPI_OBJECT_PATH_PREFIX "/org/a11y/atspi/accessible/" -#define QSPI_OBJECT_PATH_ROOT QSPI_OBJECT_PATH_PREFIX "root" - -#define QSPI_REGISTRY_NAME "org.a11y.atspi.Registry" QT_BEGIN_NAMESPACE