diff options
| author | Méven Car <[email protected]> | 2019-03-22 10:36:29 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2019-03-22 10:38:18 +0100 |
| commit | 6dbabdfee65083bd074d931643dc792cac03e675 (patch) | |
| tree | 41dceed02e055c1d5f6b1d08f17218b9b0c5d221 /src | |
| parent | af8c491904e084ad153cbeee82110c29f91a5fa3 (diff) | |
Convert foreach to for loops
Test Plan: Compile
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19911
Diffstat (limited to 'src')
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index a864cb005..2b6fff158 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -185,7 +185,8 @@ void InformationPanel::showContextMenu(const QPoint &pos) { dateformatAction->setChecked(InformationPanelSettings::dateFormat() == static_cast<int>(Baloo::DateFormats::ShortFormat)); popup.addSeparator(); - foreach (QAction* action, customContextMenuActions()) { + const auto actions = customContextMenuActions(); + for (QAction *action : actions) { popup.addAction(action); } @@ -311,7 +312,7 @@ void InformationPanel::slotFilesAdded(const QString& directory) void InformationPanel::slotFilesChanged(const QStringList& files) { - foreach (const QString& fileName, files) { + for (const QString& fileName : files) { if (m_shownUrl == QUrl::fromLocalFile(fileName)) { showItemInfo(); break; @@ -321,7 +322,7 @@ void InformationPanel::slotFilesChanged(const QStringList& files) void InformationPanel::slotFilesRemoved(const QStringList& files) { - foreach (const QString& fileName, files) { + for (const QString& fileName : files) { if (m_shownUrl == QUrl::fromLocalFile(fileName)) { // the currently shown item has been removed, show // the parent directory as fallback |
