vcl/qt5/QtAccessibleEventListener.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 9aaa528379a8943dba42488e115bae70df62cf99
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Jul 17 17:22:16 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Jul 17 21:52:45 2025 +0200

    qt a11y: Forward ROLE_CHANGED event (Qt >= 6.11)
    
    Make use of the new QAccessible::RoleChanged event type
    introduced in Qt 6.11 qtbase commit [1]
    
        commit 1fe2adea79e08446d72d639eac99b399ff2bbae0
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Thu Jul 3 09:50:43 2025 +0200
    
            a11y: Introduce RoleChanged event, bridge to AT-SPI, UIA
    
    [1] 
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1fe2adea79e08446d72d639eac99b399ff2bbae0
    
    Change-Id: I3a672855b1b748a348e7d17fe84c3431a725f6e4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187300
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtAccessibleEventListener.cxx 
b/vcl/qt5/QtAccessibleEventListener.cxx
index dea9cd35401f..bd063f982eb7 100644
--- a/vcl/qt5/QtAccessibleEventListener.cxx
+++ b/vcl/qt5/QtAccessibleEventListener.cxx
@@ -252,6 +252,14 @@ void QtAccessibleEventListener::notifyEvent(const 
css::accessibility::Accessible
             QAccessible::updateAccessibility(&aEvent);
             return;
         }
+        case AccessibleEventId::ROLE_CHANGED:
+        {
+#if QT_VERSION >= QT_VERSION_CHECK(6, 11, 0)
+            QAccessibleEvent aEvent(pQAccessibleInterface, 
QAccessible::RoleChanged);
+            QAccessible::updateAccessibility(&aEvent);
+#endif
+            return;
+        }
         case AccessibleEventId::SELECTION_CHANGED:
         {
             QAccessibleEvent aEvent(pQAccessibleInterface, 
QAccessible::Selection);
@@ -451,7 +459,6 @@ void QtAccessibleEventListener::notifyEvent(const 
css::accessibility::Accessible
             }
             return;
         }
-        case AccessibleEventId::ROLE_CHANGED:
         case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
         case AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED:
         case AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED:

Reply via email to