summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-05-22 09:15:38 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-22 20:56:38 +0200
commit018cb899d482967eb7d8ebdc48cadf1743abe680 (patch)
tree9ef551fa2b02feeaae548fddded9ad4a416ecefa /src/plugins/accessible
parent25f40b2de2b1e284ca94beda68cbfd27a012839d (diff)
Replace (un)checkAction with toggleAction (3/3)
Remove all references to (un)checkAction. This commit finalizes the intended change. Change-Id: I79d3b30b5c3d9fbe276c2c94fed5971bb21d6c02 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/accessible')
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index af0c211cca..0fa6dc9990 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -168,18 +168,11 @@ QStringList QAccessibleButton::actionNames() const
names << showMenuAction();
break;
case QAccessible::RadioButton:
- names << checkAction();
+ names << toggleAction();
break;
default:
if (button()->isCheckable()) {
- if (state().checked) {
- names << uncheckAction();
- } else {
- // FIXME
- // QCheckBox *cb = qobject_cast<QCheckBox*>(object());
- // if (!cb || !cb->isTristate() || cb->checkState() == Qt::PartiallyChecked)
- names << checkAction();
- }
+ names << toggleAction();
} else {
names << pressAction();
}
@@ -203,10 +196,8 @@ void QAccessibleButton::doAction(const QString &actionName)
else
#endif
button()->animateClick();
- } else if (actionName == checkAction()) {
- button()->setChecked(true);
- } else if (actionName == uncheckAction()) {
- button()->setChecked(false);
+ } else if (actionName == toggleAction()) {
+ button()->toggle();
} else {
QAccessibleWidget::doAction(actionName);
}
@@ -552,14 +543,14 @@ QStringList QAccessibleGroupBox::actionNames() const
QStringList actions = QAccessibleWidget::actionNames();
if (groupBox()->isCheckable()) {
- actions.prepend(QAccessibleActionInterface::checkAction());
+ actions.prepend(QAccessibleActionInterface::toggleAction());
}
return actions;
}
void QAccessibleGroupBox::doAction(const QString &actionName)
{
- if (actionName == QAccessibleActionInterface::checkAction())
+ if (actionName == QAccessibleActionInterface::toggleAction())
groupBox()->setChecked(!groupBox()->isChecked());
}