diff options
| author | Alexander Lohnau <[email protected]> | 2020-10-23 19:48:22 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-10-23 18:23:06 +0000 |
| commit | a24327cd50ef17b953ecb908d260b73460158107 (patch) | |
| tree | b0fdaf2b2ab6cc4df0d471b3f1e9f449be71aa33 /src/panels | |
| parent | 360a8dd883f7e281c0a3f2ae729450790399bf3d (diff) | |
Compile without foreach
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/folders/treeviewcontextmenu.cpp | 4 | ||||
| -rw-r--r-- | src/panels/places/placespanel.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index e6cef5441..f4181d064 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -139,10 +139,10 @@ void TreeViewContextMenu::open(const QPoint& pos) popup->addAction(propertiesAction); } - QList<QAction*> customActions = m_parent->customContextMenuActions(); + const QList<QAction*> customActions = m_parent->customContextMenuActions(); if (!customActions.isEmpty()) { popup->addSeparator(); - foreach (QAction* action, customActions) { + for (QAction* action : customActions) { popup->addAction(action); } } diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 2e1d09e6b..03cf628b4 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -322,7 +322,8 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos) menu.addMenu(iconSizeSubMenu); menu.addSeparator(); - foreach (QAction* action, customContextMenuActions()) { + const auto actions = customContextMenuActions(); + for (QAction* action : actions) { menu.addAction(action); } |
