mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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
This commit is contained in:
parent
af8c491904
commit
6dbabdfee6
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue