diff options
author | Michael Weghorn <[email protected]> | 2025-06-03 10:12:05 +0200 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2025-06-03 18:56:07 +0000 |
commit | 77f02471ed263d514c6f6edd170b97d2f6e7b44e (patch) | |
tree | a27521f3f22125d714a79083551713d1720414e7 | |
parent | 36b5854af53650132738cd950a220b45669ae5bc (diff) |
a11y atspi: Create local variable on stack
There is no reason to allocate the OrgA11yAtspiSocketInterface
object only used inside AtSpiAdaptor::registerApplication on
the heap.
Pick-to: 6.10
Change-Id: I2985acb5bd3e2f89c60de2b4ffa77b2a78cb4eff
Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r-- | src/gui/accessible/linux/atspiadaptor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 915f104035c..6978d5c0268 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -1543,13 +1543,12 @@ bool AtSpiAdaptor::applicationInterface(QAccessibleInterface *interface, const Q */ void AtSpiAdaptor::registerApplication() { - OrgA11yAtspiSocketInterface *registry; - registry = new OrgA11yAtspiSocketInterface(ATSPI_DBUS_NAME_REGISTRY ""_L1, - ATSPI_DBUS_PATH_ROOT ""_L1, m_dbus->connection()); + OrgA11yAtspiSocketInterface registry(ATSPI_DBUS_NAME_REGISTRY ""_L1, ATSPI_DBUS_PATH_ROOT ""_L1, + m_dbus->connection()); QDBusPendingReply<QSpiObjectReference> reply; QSpiObjectReference ref = QSpiObjectReference(m_dbus->connection(), QDBusObjectPath(ATSPI_DBUS_PATH_ROOT)); - reply = registry->Embed(ref); + reply = registry.Embed(ref); reply.waitForFinished(); // TODO: make this async if (reply.isValid ()) { const QSpiObjectReference &socket = reply.value(); @@ -1559,7 +1558,6 @@ void AtSpiAdaptor::registerApplication() << reply.error().name() << reply.error().message(); } - delete registry; } // Accessible |