diff options
-rw-r--r-- | src/gui/widgets/qstatusbar.cpp | 10 | ||||
-rw-r--r-- | src/plugins/accessible/widgets/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/accessible/widgets/simplewidgets.cpp | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/widgets/qstatusbar.cpp b/src/gui/widgets/qstatusbar.cpp index 5cfbe7c..2cec5f7 100644 --- a/src/gui/widgets/qstatusbar.cpp +++ b/src/gui/widgets/qstatusbar.cpp @@ -53,6 +53,10 @@ #include "qsizegrip.h" #include "qmainwindow.h" +#ifndef QT_NO_ACCESSIBILITY +#include "qaccessible.h" +#endif + #include <private/qlayoutengine_p.h> #include <private/qwidget_p.h> @@ -690,6 +694,12 @@ void QStatusBar::hideOrShow() } emit messageChanged(d->tempItem); + +#ifndef QT_NO_ACCESSIBILITY + if (QAccessible::isActive()) + QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged); +#endif + repaint(d->messageRect()); } 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; |