From: Jan-Arve Saether Date: Tue, 22 May 2012 07:04:59 +0000 (+0200) Subject: Replace (un)checkAction with toggleAction (2/3) X-Git-Tag: 071012131707~339 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ac33a523e7feccff03032e8ff85206364d120a9;p=profile%2Fivi%2Fqtdeclarative.git Replace (un)checkAction with toggleAction (2/3) Needed in order to finalize the replacement of {check,uncheck}Action with toggleAction. Change-Id: I7328275aa86cf4e8dc093f86597529b41fefd4a6 Reviewed-by: Morten Johan Sørvig --- diff --git a/src/plugins/accessible/shared/qqmlaccessible.cpp b/src/plugins/accessible/shared/qqmlaccessible.cpp index 54d0c06..d4d4059 100644 --- a/src/plugins/accessible/shared/qqmlaccessible.cpp +++ b/src/plugins/accessible/shared/qqmlaccessible.cpp @@ -138,9 +138,7 @@ QStringList QQmlAccessible::actionNames() const break; case QAccessible::RadioButton: case QAccessible::CheckBox: - actions << QAccessibleActionInterface::checkAction() - << QAccessibleActionInterface::uncheckAction() - << QAccessibleActionInterface::pressAction(); + actions << QAccessibleActionInterface::toggleAction(); break; case QAccessible::Slider: case QAccessible::SpinBox: @@ -174,12 +172,8 @@ void QQmlAccessible::doAction(const QString &actionName) case QAccessible::CheckBox: { QVariant checked = object()->property("checked"); if (checked.isValid()) { - if (actionName == QAccessibleActionInterface::pressAction()) { + if (actionName == QAccessibleActionInterface::toggleAction()) { object()->setProperty("checked", QVariant(!checked.toBool())); - } else if (actionName == QAccessibleActionInterface::checkAction()) { - object()->setProperty("checked", QVariant(true)); - } else if (actionName == QAccessibleActionInterface::uncheckAction()) { - object()->setProperty("checked", QVariant(false)); } } break;