summaryrefslogtreecommitdiff
path: root/vcl/inc/qt5/QtXAccessible.hxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-08-16 14:13:20 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-08-16 22:29:15 +0200
commitf2371a7d9b306ce217689bd69c920c9f780f1ee3 (patch)
tree96c2898408c0785c6fce58f336aa8ef55c1432c5 /vcl/inc/qt5/QtXAccessible.hxx
parenta65719ec67523cdfc294aeeda527b51ba4d2e17c (diff)
qt a11y: Clear QtXAccessible's ref to XAccessible once passed on
The `QtXAccessible` only needs to hold a reference to the `XAccessible` in order to pass it to the `QtAccessibleWidget` ctor in `QtAccessibleWidget::customFactory` (which gets called via `QAccessible::queryAccessibleInterface`). After that has happened, the `QtAccessibleWidget` holds its own reference in its `m_xAccessible` member and is the only class in the context of the qt a11y bridge that needs access to the `XAccessible`, so drop the reference in the `QtXAccessible` to avoid any references being held even after `QtAccessibleEventListener::disposing` has been called, s.a. Change-Id I077dffe6ca3e887707d1f578e947ccf3c2c2a492 "qt a11y: Clear XAccessible reference when disposing" for some more context. Change-Id: Ief80b2939e4c509fc4bc68e67500dbad66498506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138365 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/inc/qt5/QtXAccessible.hxx')
-rw-r--r--vcl/inc/qt5/QtXAccessible.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/inc/qt5/QtXAccessible.hxx b/vcl/inc/qt5/QtXAccessible.hxx
index 4f4285e8065b..ddb7849b641c 100644
--- a/vcl/inc/qt5/QtXAccessible.hxx
+++ b/vcl/inc/qt5/QtXAccessible.hxx
@@ -28,6 +28,11 @@ class QtXAccessible : public QObject
public:
QtXAccessible(css::uno::Reference<css::accessibility::XAccessible> xAccessible);
+
+ /** Reference to the XAccessible.
+ * This is cleared once it has been passed to the QtAccessibleWidget,
+ * which then keeps an own reference and takes care of all required
+ * access to the XAccessible for the Qt a11y bridge. */
css::uno::Reference<css::accessibility::XAccessible> m_xAccessible;
};