diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-03-14 17:57:27 (GMT) |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-03-23 12:57:29 (GMT) |
commit | 6040eeebfb1ab3be3906295c373033cd5b5d9dc3 (patch) | |
tree | 83f83e7cd48d016a33c1d8a34ffa76bfd78d8f81 /src/plugins | |
parent | 9a5b0d7a579572cd7e7faf869ab1a6684800f592 (diff) | |
download | Qt-6040eeebfb1ab3be3906295c373033cd5b5d9dc3.zip Qt-6040eeebfb1ab3be3906295c373033cd5b5d9dc3.tar.gz Qt-6040eeebfb1ab3be3906295c373033cd5b5d9dc3.tar.bz2 |
Fix text for checkable buttons, unit tests.
Return Check/Uncheck for checkable buttons.
Partially revive the buttons unit test.
Reviewed-by: Jan-Arve
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/accessible/widgets/simplewidgets.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp index 21d2d67..1510292 100644 --- a/src/plugins/accessible/widgets/simplewidgets.cpp +++ b/src/plugins/accessible/widgets/simplewidgets.cpp @@ -227,6 +227,9 @@ QString QAccessibleButton::description(int actionIndex) { switch (actionIndex) { case 0: + if (button()->isCheckable()) { + return QLatin1String("Toggles the button."); + } return QLatin1String("Clicks the button."); default: return QString(); @@ -237,6 +240,13 @@ QString QAccessibleButton::name(int actionIndex) { switch (actionIndex) { case 0: + if (button()->isCheckable()) { + if (button()->isChecked()) { + return QLatin1String("Uncheck"); + } else { + return QLatin1String("Check"); + } + } return QLatin1String("Press"); default: return QString(); @@ -247,6 +257,13 @@ QString QAccessibleButton::localizedName(int actionIndex) { switch (actionIndex) { case 0: + if (button()->isCheckable()) { + if (button()->isChecked()) { + return tr("Uncheck"); + } else { + return tr("Check"); + } + } return tr("Press"); default: return QString(); |