summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2015-12-03 10:53:06 +0100
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2015-12-04 14:38:34 +0000
commit753ebd5ba02d2f3e7286f69626d8415f52b775fc (patch)
tree135a7803984b8dd00b00f8d1d86a4a97a5d740eb /src/gui/accessible
parentdc0c68262e63b2f74268af7bbf43023b158329b8 (diff)
Respond with a sound for certain message boxes on windows
This was a regression (it worked in 4.8) that was probably introduced by the refactoring of the accessibility framework in Qt 5. Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called regardless of isActive(), so its the responsibility of each implementation of notifyAccessibilityUpdate() to check for isActive() where it matters. Task-number: QTBUG-33303 Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index e9995045b1..1a8d263f94 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -852,18 +852,17 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
// during construction of widgets. If you see cases where the
// cache seems wrong, this call is "to blame", but the code that
// caches dynamic data should be updated to handle change events.
- if (!isActive() || !event->accessibleInterface())
- return;
-
- if (event->type() == QAccessible::TableModelChanged) {
- QAccessibleInterface *iface = event->accessibleInterface();
- if (iface && iface->tableInterface())
- iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
- }
+ QAccessibleInterface *iface = event->accessibleInterface();
+ if (isActive() && iface) {
+ if (event->type() == QAccessible::TableModelChanged) {
+ if (iface->tableInterface())
+ iface->tableInterface()->modelChange(static_cast<QAccessibleTableModelChangeEvent*>(event));
+ }
- if (updateHandler) {
- updateHandler(event);
- return;
+ if (updateHandler) {
+ updateHandler(event);
+ return;
+ }
}
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())