From a2c609d977e0e6d6bcf9806a115f6c9119bf24f8 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Sun, 11 Apr 2010 18:50:56 +0200 Subject: Fix problem with accessibility clients not getting info from QFileDialog This fixes a problem with accessibility and QFileDialog, in addition the fix to complexwidgets.cpp will also fix any itemview that uses a root index. Reviewed-by: Jan-Arve --- src/gui/dialogs/qfiledialog.ui | 36 +++++++++++++++++++++++ src/plugins/accessible/widgets/complexwidgets.cpp | 3 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog.ui b/src/gui/dialogs/qfiledialog.ui index b52bd8a..1f35abb 100644 --- a/src/gui/dialogs/qfiledialog.ui +++ b/src/gui/dialogs/qfiledialog.ui @@ -83,6 +83,12 @@ Back + + Back + + + Go back + @@ -90,6 +96,12 @@ Forward + + Forward + + + Go forward + @@ -97,6 +109,12 @@ Parent Directory + + Parent Directory + + + Go to the parent directory + @@ -104,6 +122,12 @@ Create New Folder + + Create New Folder + + + Create a New Folder + @@ -111,6 +135,12 @@ List View + + List View + + + Change to list view mode + @@ -118,6 +148,12 @@ Detail View + + Detail View + + + Change to detail view mode + diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp index b4ca8f2..8be1560 100644 --- a/src/plugins/accessible/widgets/complexwidgets.cpp +++ b/src/plugins/accessible/widgets/complexwidgets.cpp @@ -724,7 +724,8 @@ public: if (start.isValid()) { m_current = start; } else if (m_view && m_view->model()) { - m_current = view->model()->index(0, 0); + m_current = view->rootIndex().isValid() ? + view->rootIndex().child(0,0) : view->model()->index(0, 0); } } -- cgit v0.12