diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-01-19 14:20:54 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-06 10:15:09 +0100 |
commit | 1d18fd01645e3b9efcd1a2c5dd030a5fc0f5892a (patch) | |
tree | 84c4e4df3f91f80e07641a5a3b0b0cfcecbe6705 /src/gui/accessible/qaccessibleobject.cpp | |
parent | fdf9ee12916651c708dcd63d557e11e36ec7eb4e (diff) | |
download | qtbase-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.cpp | 25 |
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 */ |