diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-05-05 14:40:45 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-05-09 12:18:00 (GMT) |
commit | a825b3a9e6132842090e43fae85d2c6c61b2def6 (patch) | |
tree | 19c15fc2fc770d3930ed2b0ee516684f3a164d06 | |
parent | 9a02ad74693f1835745ec20798b353f7e62bcd5e (diff) | |
download | Qt-a825b3a9e6132842090e43fae85d2c6c61b2def6.zip Qt-a825b3a9e6132842090e43fae85d2c6c61b2def6.tar.gz Qt-a825b3a9e6132842090e43fae85d2c6c61b2def6.tar.bz2 |
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
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ebc9dd5..434a788 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -11344,8 +11344,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 } |