Accessibility: call update handler even if not active

Update handlers should get informed about accessibility updates even if
the platform's accessibility bridge is not activated. E.g. an analytics
or test framework (like Qt Insights) might want to use the handler to
record relevant events.

While many events are only delivered if QAccessible::isActive returns
true to avoid spending computing time on creating the relevant event
data (e.g. in item views that can be expensive), the most important
events are still delivered. And requiring activation of accessibility
before events can be recorded through a handler has side effects on
performance, which we want to avoid.

Change-Id: I896b873574f6ad2527f755912d4950aa1f898097
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-05-10 10:13:57 +02:00
parent fd565750f3
commit 322387ce7b

View File

@ -866,11 +866,11 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (iface->tableInterface())
iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
}
}
if (updateHandler) {
updateHandler(event);
return;
}
if (updateHandler) {
updateHandler(event);
return;
}
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())