summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/qt5/QtAccessibleWidget.hxx4
-rw-r--r--vcl/qt5/QtAccessibleEventListener.cxx6
-rw-r--r--vcl/qt5/QtAccessibleWidget.cxx2
3 files changed, 11 insertions, 1 deletions
diff --git a/vcl/inc/qt5/QtAccessibleWidget.hxx b/vcl/inc/qt5/QtAccessibleWidget.hxx
index fdd97b0b407d..0ca17b394123 100644
--- a/vcl/inc/qt5/QtAccessibleWidget.hxx
+++ b/vcl/inc/qt5/QtAccessibleWidget.hxx
@@ -50,6 +50,10 @@ class QtAccessibleWidget final : public QObject,
public:
QtAccessibleWidget(const css::uno::Reference<css::accessibility::XAccessible> xAccessible,
QObject* pObject);
+
+ void invalidate();
+
+ // QAccessibleInterface
QWindow* window() const override;
int childCount() const override;
int indexOfChild(const QAccessibleInterface* child) const override;
diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx
index ee562a4eca38..53256181ea4e 100644
--- a/vcl/qt5/QtAccessibleEventListener.cxx
+++ b/vcl/qt5/QtAccessibleEventListener.cxx
@@ -353,6 +353,10 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible
}
}
-void QtAccessibleEventListener::disposing(const EventObject& /* Source */) {}
+void QtAccessibleEventListener::disposing(const EventObject& /* Source */)
+{
+ assert(m_pAccessibleWidget);
+ m_pAccessibleWidget->invalidate();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx
index d6370877f449..83733e04c285 100644
--- a/vcl/qt5/QtAccessibleWidget.cxx
+++ b/vcl/qt5/QtAccessibleWidget.cxx
@@ -73,6 +73,8 @@ QtAccessibleWidget::QtAccessibleWidget(const Reference<XAccessible> xAccessible,
}
}
+void QtAccessibleWidget::invalidate() { m_xAccessible.clear(); }
+
Reference<XAccessibleContext> QtAccessibleWidget::getAccessibleContextImpl() const
{
Reference<XAccessibleContext> xAc;