Add clearActions() to remove every applet interface action
REVIEW: 126742
This commit is contained in:
parent
225efd7e71
commit
d11c7535ba
@ -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);
|
||||
|
@ -242,6 +242,8 @@ public:
|
||||
|
||||
Q_INVOKABLE void removeAction(const QString &name);
|
||||
|
||||
Q_INVOKABLE void clearActions();
|
||||
|
||||
Q_INVOKABLE QAction *action(QString name) const;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user