summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <qt-info@nokia.com>2010-04-11 16:50:56 (GMT)
committerAndy Shaw <qt-info@nokia.com>2010-04-11 16:50:56 (GMT)
commita2c609d977e0e6d6bcf9806a115f6c9119bf24f8 (patch)
tree0d8de1c08870fb392210aa6f0b20017d5151ee25 /src
parent698c7a45d156e9f85afb870ffcd5b99d08d8677b (diff)
downloadQt-a2c609d977e0e6d6bcf9806a115f6c9119bf24f8.zip
Qt-a2c609d977e0e6d6bcf9806a115f6c9119bf24f8.tar.gz
Qt-a2c609d977e0e6d6bcf9806a115f6c9119bf24f8.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfiledialog.ui36
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp3
2 files changed, 38 insertions, 1 deletions
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 @@
<property name="toolTip" >
<string>Back</string>
</property>
+ <property name="accessibleName">
+ <string>Back</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Go back</string>
+ </property>
</widget>
</item>
<item>
@@ -90,6 +96,12 @@
<property name="toolTip" >
<string>Forward</string>
</property>
+ <property name="accessibleName">
+ <string>Forward</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Go forward</string>
+ </property>
</widget>
</item>
<item>
@@ -97,6 +109,12 @@
<property name="toolTip" >
<string>Parent Directory</string>
</property>
+ <property name="accessibleName">
+ <string>Parent Directory</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Go to the parent directory</string>
+ </property>
</widget>
</item>
<item>
@@ -104,6 +122,12 @@
<property name="toolTip" >
<string>Create New Folder</string>
</property>
+ <property name="accessibleName">
+ <string>Create New Folder</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Create a New Folder</string>
+ </property>
</widget>
</item>
<item>
@@ -111,6 +135,12 @@
<property name="toolTip" >
<string>List View</string>
</property>
+ <property name="accessibleName">
+ <string>List View</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Change to list view mode</string>
+ </property>
</widget>
</item>
<item>
@@ -118,6 +148,12 @@
<property name="toolTip" >
<string>Detail View</string>
</property>
+ <property name="accessibleName">
+ <string>Detail View</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Change to detail view mode</string>
+ </property>
</widget>
</item>
</layout>
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);
}
}