summaryrefslogtreecommitdiff
path: root/src/gui/accessible/qaccessibleobject.cpp
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-01-19 14:20:54 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-06 10:15:09 +0100
commit1d18fd01645e3b9efcd1a2c5dd030a5fc0f5892a (patch)
tree84c4e4df3f91f80e07641a5a3b0b0cfcecbe6705 /src/gui/accessible/qaccessibleobject.cpp
parentfdf9ee12916651c708dcd63d557e11e36ec7eb4e (diff)
downloadqtbase-1d18fd01645e3b9efcd1a2c5dd030a5fc0f5892a.tar.gz
Remove QAccessible::FocusChild, add focusChild()
Also cleanup (reduce) all implementations of navigate() in order to make the final removal of navigate smoother. Change-Id: I2c216db8f5b2e40afcce8f859fc775053adc2fe3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui/accessible/qaccessibleobject.cpp')
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index b9e0ac388b..d277f39c43 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -237,28 +237,13 @@ QAccessibleInterface *QAccessibleApplication::child(int index) const
return 0;
}
+
/*! \reimp */
-int QAccessibleApplication::navigate(QAccessible::RelationFlag relation, int,
- QAccessibleInterface **target) const
+QAccessibleInterface *QAccessibleApplication::focusChild() const
{
- if (!target)
- return -1;
-
- *target = 0;
- QObject *targetObject = 0;
-
- switch (relation) {
- case QAccessible::FocusChild:
- if (QWindow *window = QGuiApplication::activeWindow()) {
- *target = window->accessibleRoot();
- return 0;
- }
- break;
- default:
- break;
- }
- *target = QAccessible::queryAccessibleInterface(targetObject);
- return *target ? 0 : -1;
+ if (QWindow *window = QGuiApplication::activeWindow())
+ return window->accessibleRoot();
+ return 0;
}
/*! \reimp */