diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-05-22 08:58:48 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-22 09:54:18 +0200 |
commit | c47f220f1a4939faaee462a7549dc17026a5a319 (patch) | |
tree | 8583cdac4fac23beb692a98f4c28d020f3f28ade /src/gui/accessible/qaccessible2.cpp | |
parent | a40e0f6c7a0df00da79d57509aae0b798705244c (diff) |
Replace (un)checkAction with toggleAction (1/3)
Add toggleAction to QAccessibleActionInterface.
This change is split into separate modules, thus we have to be careful
of not breaking qtdeclarative, which currently depends (un)checkAction.
Therefore we apply the patches in this order:
1. Add toggleAction to QAccessibleActionInterface (in qtbase)
2. Replace all references to (un)checkAction with toggleAction
(in qtdeclarative)
3. Remove all references to (un)checkAction (in qtbase)
Change-Id: Ib00fee3139eeabbece97295bc3d713ab119c92e6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/gui/accessible/qaccessible2.cpp')
-rw-r--r-- | src/gui/accessible/qaccessible2.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp index d3dafb8820..5ada74ca63 100644 --- a/src/gui/accessible/qaccessible2.cpp +++ b/src/gui/accessible/qaccessible2.cpp @@ -461,6 +461,7 @@ struct QAccessibleActionStrings decreaseAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Decrease"))), showMenuAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "ShowMenu"))), setFocusAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "SetFocus"))), + toggleAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Toggle"))), checkAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Check"))), uncheckAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Uncheck"))) {} @@ -469,6 +470,7 @@ struct QAccessibleActionStrings const QString decreaseAction; const QString showMenuAction; const QString setFocusAction; + const QString toggleAction; const QString checkAction; const QString uncheckAction; }; @@ -493,6 +495,8 @@ QString QAccessibleActionInterface::localizedActionDescription(const QString &ac return tr("Shows the menu"); else if (actionName == strings->setFocusAction) return tr("Sets the focus"); + else if (actionName == strings->toggleAction) + return tr("Toggles the state"); else if (actionName == strings->checkAction) return tr("Checks the checkbox"); else if (actionName == strings->uncheckAction) @@ -547,6 +551,15 @@ const QString &QAccessibleActionInterface::setFocusAction() } /*! + Returns the name of the toggle default action. + \sa actionNames(), localizedActionName() + */ +const QString &QAccessibleActionInterface::toggleAction() +{ + return accessibleActionStrings()->toggleAction; +} + +/*! Returns the name of the check default action. \sa actionNames(), localizedActionName() */ |