summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2011-05-05 14:28:58 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2011-05-09 12:17:37 (GMT)
commit9a02ad74693f1835745ec20798b353f7e62bcd5e (patch)
treeaf56fda196e0ca066d3fb7d6184aeb7225f57c98 /src/gui/graphicsview
parent4687938fd03ed65306039af6b4e5e192ec8bf491 (diff)
downloadQt-9a02ad74693f1835745ec20798b353f7e62bcd5e.zip
Qt-9a02ad74693f1835745ec20798b353f7e62bcd5e.tar.gz
Qt-9a02ad74693f1835745ec20798b353f7e62bcd5e.tar.bz2
Notify a11y framework of FocusChanges for QGraphicsObject
(cherry picked from commit 1b5cb7865eb8b48a2721f9b9c3ccd2fb25f8175d) Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 0713d09..ba4c914 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -245,6 +245,10 @@
#include <QtGui/qtransform.h>
#include <QtGui/qinputcontext.h>
#include <QtGui/qgraphicseffect.h>
+#ifndef QT_NO_ACCESSIBILITY
+# include <QtGui/qaccessible.h>
+#endif
+
#include <private/qapplication_p.h>
#include <private/qobject_p.h>
#ifdef Q_WS_X11
@@ -837,6 +841,14 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
if (item)
focusItem = item;
updateInputMethodSensitivityInViews();
+
+#ifndef QT_NO_ACCESSIBILITY
+ if (focusItem) {
+ if (QGraphicsObject *focusObj = focusItem->toGraphicsObject()) {
+ QAccessible::updateAccessibility(focusObj, 0, QAccessible::Focus);
+ }
+ }
+#endif
if (item) {
QFocusEvent event(QEvent::FocusIn, focusReason);
sendEvent(item, &event);