diff options
-rw-r--r-- | vcl/qt5/QtAccessibleEventListener.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 3716472b2d96..16a5a074b8cb 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -344,14 +344,10 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible return; } - // use the QAccessibleEvent ctor taking a QObject* instead of the one that takes QAccessibleInterface* - // to work around QTBUG-105988 - QAccessibleEvent* pSelectionAddEvent - = new QAccessibleEvent(pQAccessibleInterface->object(), eEventType); - // Qt expects the index of the (un)selected child to be set in the event - sal_Int32 nChildIndex = xContext->getAccessibleIndexInParent(); - pSelectionAddEvent->setChild(nChildIndex); - QAccessible::updateAccessibility(pSelectionAddEvent); + // Qt expects the event to be sent for the (un)selected child + QObject* pChildObject = QtAccessibleRegistry::getQObject(xChildAcc); + assert(pChildObject); + QAccessible::updateAccessibility(new QAccessibleEvent(pChildObject, eEventType)); return; } case AccessibleEventId::SELECTION_CHANGED_WITHIN: |