Use QGuiApp::activeWindow()->accessibleRoot() to find focus child

queryAccessibleInterface will return 0 if the object is a QWindow, so
it would never find the focus child.

Change-Id: Ib5bb6a0e4ffbf1b8491b71d1ba5a039e7a6584e0
Reviewed-on: http://codereview.qt-project.org/5842
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
Jan-Arve Saether 2011-09-22 17:21:36 +02:00 committed by Qt by Nokia
parent 2d8863bfa0
commit a06cb56dde

View File

@ -312,7 +312,10 @@ int QAccessibleApplication::navigate(RelationFlag relation, int entry,
targetObject = object();
break;
case FocusChild:
targetObject = QGuiApplication::activeWindow();
if (QWindow *window = QGuiApplication::activeWindow()) {
*target = window->accessibleRoot();
return 0;
}
break;
case Ancestor:
*target = parent();