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>
This commit is contained in:
parent
a40e0f6c7a
commit
c47f220f1a
@ -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)
|
||||
@ -546,6 +550,15 @@ const QString &QAccessibleActionInterface::setFocusAction()
|
||||
return accessibleActionStrings()->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()
|
||||
|
@ -232,6 +232,7 @@ public:
|
||||
static const QString &decreaseAction();
|
||||
static const QString &showMenuAction();
|
||||
static const QString &setFocusAction();
|
||||
static const QString &toggleAction();
|
||||
static const QString &checkAction();
|
||||
static const QString &uncheckAction();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user