Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add active and invisible states for accessibility.
QQuickView should expose the right states.

Change-Id: I38c0ce8bea46a749efb0b9085fb0f646538698b2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
  • Loading branch information
Frederik Gladhorn authored and Qt by Nokia committed Mar 23, 2012
1 parent 3d8f103 commit 523be17
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/accessible/quick/qaccessiblequickview.cpp
Expand Up @@ -41,6 +41,8 @@

#include "qaccessiblequickview.h"

#include <QtGui/qguiapplication.h>

#include <QtQuick/qquickitem.h>
#include <QtQuick/private/qquickitem_p.h>

Expand Down Expand Up @@ -83,7 +85,12 @@ QAccessible::Role QAccessibleQuickView::role() const

QAccessible::State QAccessibleQuickView::state() const
{
return QAccessible::State(); // FIXME
QAccessible::State st;
if (view() == QGuiApplication::focusWindow())
st.active = true;
if (!view()->isVisible())
st.invisible = true;
return st;
}

QRect QAccessibleQuickView::rect() const
Expand Down

0 comments on commit 523be17

Please sign in to comment.