mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 17:30:15 +00:00
use addActions instead of doing addAction in a loop
This commit is contained in:
parent
297a67aad8
commit
ee879cf353
|
@ -523,17 +523,13 @@ void DolphinContextMenu::addVersionControlPluginActions()
|
|||
const DolphinView* view = m_mainWindow->activeViewContainer()->view();
|
||||
const QList<QAction*> versionControlActions = view->versionControlActions(m_selectedItems);
|
||||
if (!versionControlActions.isEmpty()) {
|
||||
foreach (QAction* action, versionControlActions) {
|
||||
addAction(action);
|
||||
}
|
||||
addActions(versionControlActions);
|
||||
addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinContextMenu::addCustomActions()
|
||||
{
|
||||
foreach (QAction* action, m_customActions) {
|
||||
addAction(action);
|
||||
}
|
||||
addActions(m_customActions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue