diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-05-05 14:21:36 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-05-09 12:03:45 (GMT) |
commit | 4687938fd03ed65306039af6b4e5e192ec8bf491 (patch) | |
tree | 17ddcd601501b8a1fded4d547082ae2160109958 /src/gui/graphicsview | |
parent | 96406a7dd609e75340f7b4a05726c60c197786b8 (diff) | |
download | Qt-4687938fd03ed65306039af6b4e5e192ec8bf491.zip Qt-4687938fd03ed65306039af6b4e5e192ec8bf491.tar.gz Qt-4687938fd03ed65306039af6b4e5e192ec8bf491.tar.bz2 |
Call updateAccessibility on the QGraphicsObject in updateMicroFocus
Since QGraphicsObjects now can be in the a11y hierarchy, we should
treat them just like we treat widgets.
(cherry picked from commit 860745a4713b29857d14571572504da71a2ca077)
Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index e67fe82..41ff317 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7395,15 +7395,19 @@ void QGraphicsItem::updateMicroFocus() if (QWidget *fw = QApplication::focusWidget()) { if (scene()) { for (int i = 0 ; i < scene()->views().count() ; ++i) { - if (scene()->views().at(i) == fw) - if (QInputContext *inputContext = fw->inputContext()) + if (scene()->views().at(i) == fw) { + if (QInputContext *inputContext = fw->inputContext()) { inputContext->update(); - } - } #ifndef QT_NO_ACCESSIBILITY - // ##### is this correct - QAccessible::updateAccessibility(fw, 0, QAccessible::StateChanged); + // ##### is this correct + if (toGraphicsObject()) + QAccessible::updateAccessibility(toGraphicsObject(), 0, QAccessible::StateChanged); #endif + break; + } + } + } + } } #endif } |