summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-06-27 15:16:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-06-27 15:16:46 (GMT)
commitb39dc4a9029040f43f1ca3ace6bf7e77740a3f39 (patch)
treef3aee03f9c978f645d56307a5162a8e0f65b021c /src/gui/graphicsview
parenteadf2bbf49e906f43421fc31fd76ba9812a545f4 (diff)
parentfff467981fe515974e722e1d092a916f6a8f5dcc (diff)
downloadQt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.zip
Qt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.tar.gz
Qt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging: Incorrect property name in QAccessibleAbstractSpinBox::setCurrentValue When asking for relations, don't crash on children that don't return an interface. Remove more inconsistencies with invisible. QAccessibleToolButton::text should return accessibleName if set. Remove stray semicolon. Do not expose text when echo mode is not Normal. Check validator when changing text using accessibility functions. Fix some issues introduced in df6713b8f55fc007796f40. Add tilde (both ~ and ~<userName>) expansion to QFileDialog on UNIX. Avoid bogus accessibility focus events from menus. Build fix for Mac OS 10.5 Avoided calling updateAccessibility() from updateMicroFocus if the item was hidden Notify a11y framework of FocusChanges for QGraphicsObject Call updateAccessibility on the QGraphicsObject in updateMicroFocus Fix updateAccessibility for QGraphicsObjects Make accessibility work on Windows with alien
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp16
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp12
2 files changed, 22 insertions, 6 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index e8f80b4..ef53963 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
}
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 7e70f47..655725b 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);