summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2011-05-05 16:40:45 +0200
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2011-05-10 12:35:52 +0200
commit97952e918df3d7ace112d805377907927f1c7c2d (patch)
tree6d7cc3393a867e084be4a9a99f51f972e9da547a /src
parent015434360832572fcd9508f03ff8de0009b88777 (diff)
Avoided calling updateAccessibility() from updateMicroFocus if the item was hidden
This had the following negative effect in qmlviewer: - Every time the qmlviewer logged something to its QPlainTextEdit (regardless of if it was visible or not) it would call updateMicroFocus (because appending to QPlainTextEdit would move the cursor). The result was that the AT client got overloaded with accessibility state changes, and response time got really bad. (cherry picked from commit ad50e45311cce712fbe35641cde973d616ff560d) Reviewed-by: Frederik Gladhorn (cherry picked from commit a825b3a9e6132842090e43fae85d2c6c61b2def6)
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 758cccefdc..b4e1286b9c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -11342,8 +11342,10 @@ void QWidget::updateMicroFocus()
}
#endif
#ifndef QT_NO_ACCESSIBILITY
- // ##### is this correct
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ if (isVisible()) {
+ // ##### is this correct
+ QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ }
#endif
}