summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2012-08-17 16:14:12 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-08-23 14:38:03 (GMT)
commit465c6fe7a16365c2fb7b46b664faaa9c1bacd022 (patch)
tree5254d8b881249ac84f18188226ff62ef5446940f /src/plugins/accessible/widgets
parent88b4128ae0c992cedbbe785137ee55dfd623cf42 (diff)
downloadQt-465c6fe7a16365c2fb7b46b664faaa9c1bacd022.zip
Qt-465c6fe7a16365c2fb7b46b664faaa9c1bacd022.tar.gz
Qt-465c6fe7a16365c2fb7b46b664faaa9c1bacd022.tar.bz2
Make QStatusBar text available via accessibility.
Change-Id: Iec3efb4b91bdba33fe93b928ff2349440e15aa35 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/plugins/accessible/widgets')
-rw-r--r--src/plugins/accessible/widgets/main.cpp2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/accessible/widgets/main.cpp b/src/plugins/accessible/widgets/main.cpp
index f1fad35..ae1a090 100644
--- a/src/plugins/accessible/widgets/main.cpp
+++ b/src/plugins/accessible/widgets/main.cpp
@@ -239,7 +239,7 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
iface = new QAccessibleGroupBox(widget);
#endif
} else if (classname == QLatin1String("QStatusBar")) {
- iface = new QAccessibleWidgetEx(widget, StatusBar);
+ iface = new QAccessibleDisplay(widget);
#ifndef QT_NO_PROGRESSBAR
} else if (classname == QLatin1String("QProgressBar")) {
iface = new QAccessibleProgressBar(widget);
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 126045e..2e1ca5b 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -45,6 +45,7 @@
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qprogressbar.h>
+#include <qstatusbar.h>
#include <qradiobutton.h>
#include <qtoolbutton.h>
#include <qlabel.h>
@@ -524,6 +525,8 @@ QAccessible::Role QAccessibleDisplay::role(int child) const
} else if (qobject_cast<QProgressBar*>(object())) {
return ProgressBar;
#endif
+ } else if (qobject_cast<QStatusBar*>(object())) {
+ return StatusBar;
}
return QAccessibleWidgetEx::role(child);
}
@@ -546,6 +549,8 @@ QString QAccessibleDisplay::text(Text t, int child) const
else
str = QString::number(l->intValue());
#endif
+ } else if (qobject_cast<QStatusBar*>(object())) {
+ return qobject_cast<QStatusBar*>(object())->currentMessage();
}
}
break;