Add clearActions() to remove every applet interface action

REVIEW: 126742
This commit is contained in:
David Edmundson 2016-01-16 16:02:57 +00:00
parent 225efd7e71
commit d11c7535ba
2 changed files with 9 additions and 0 deletions

View File

@ -499,6 +499,13 @@ void AppletInterface::removeAction(const QString &name)
m_actions.removeAll(name);
}
void AppletInterface::clearActions()
{
Q_FOREACH (const QString &action, m_actions) {
removeAction(action);
}
}
QAction *AppletInterface::action(QString name) const
{
return applet()->actions()->action(name);

View File

@ -242,6 +242,8 @@ public:
Q_INVOKABLE void removeAction(const QString &name);
Q_INVOKABLE void clearActions();
Q_INVOKABLE QAction *action(QString name) const;
/**