From dde63b7c5a05a2f23458ad43b7b29c2354b10dc3 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 12 Dec 2012 11:49:21 +0100 Subject: Accessibility: Work with QQuickWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before we would only be accessible when QQView was used. While the window has the content item, that one will not appear in the hierarchy of accessible objects since it has no valueable properties to expose. Instead it's first child will be used (which was the case before when QQView was used). Change-Id: I03cefb5c8dcd8296d51ff2bfcb677386a5f1d698 Reviewed-by: Jan Arve Sæther --- src/plugins/accessible/quick/qaccessiblequickview.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/plugins/accessible/quick/qaccessiblequickview.h') diff --git a/src/plugins/accessible/quick/qaccessiblequickview.h b/src/plugins/accessible/quick/qaccessiblequickview.h index 03061be275..2b01b18f3c 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.h +++ b/src/plugins/accessible/quick/qaccessiblequickview.h @@ -44,16 +44,16 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE #ifndef QT_NO_ACCESSIBILITY -class QAccessibleQuickView : public QAccessibleObject +class QAccessibleQuickWindow : public QAccessibleObject { public: - QAccessibleQuickView(QQuickView *object); + QAccessibleQuickWindow(QQuickWindow *object); QAccessibleInterface *parent() const; QAccessibleInterface *child(int index) const; @@ -66,8 +66,10 @@ public: int indexOfChild(const QAccessibleInterface *iface) const; QString text(QAccessible::Text text) const; QAccessibleInterface *childAt(int x, int y) const; + private: - QQuickView *view() const { return static_cast(object()); } + QQuickWindow *window() const { return static_cast(object()); } + QQuickItem *rootItem() const; }; #endif // QT_NO_ACCESSIBILITY -- cgit v1.2.3