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 DolphinView* view = m_mainWindow->activeViewContainer()->view();
|
||||||
const QList<QAction*> versionControlActions = view->versionControlActions(m_selectedItems);
|
const QList<QAction*> versionControlActions = view->versionControlActions(m_selectedItems);
|
||||||
if (!versionControlActions.isEmpty()) {
|
if (!versionControlActions.isEmpty()) {
|
||||||
foreach (QAction* action, versionControlActions) {
|
addActions(versionControlActions);
|
||||||
addAction(action);
|
|
||||||
}
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinContextMenu::addCustomActions()
|
void DolphinContextMenu::addCustomActions()
|
||||||
{
|
{
|
||||||
foreach (QAction* action, m_customActions) {
|
addActions(m_customActions);
|
||||||
addAction(action);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue