diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-07 22:08:54 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-07 22:08:54 +0000 |
| commit | 1e31fe896524513577911e382897b841e40a4814 (patch) | |
| tree | 153483337dcab82e0bc32cc19f7876a7eb9593c7 /src/plugins/General/fileops/fileops.cpp | |
| parent | 1d6f69e20769d902a70001277199129361d0a761 (diff) | |
| download | qmmp-1e31fe896524513577911e382897b841e40a4814.tar.gz qmmp-1e31fe896524513577911e382897b841e40a4814.tar.bz2 qmmp-1e31fe896524513577911e382897b841e40a4814.zip | |
removed foreach macro
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9067 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/fileops/fileops.cpp')
| -rw-r--r-- | src/plugins/General/fileops/fileops.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/General/fileops/fileops.cpp b/src/plugins/General/fileops/fileops.cpp index 16058fdc9..a6478438b 100644 --- a/src/plugins/General/fileops/fileops.cpp +++ b/src/plugins/General/fileops/fileops.cpp @@ -113,7 +113,7 @@ void FileOps::execAction(int n) QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) break; - foreach(PlayListTrack *track, tracks) + for(PlayListTrack *track : qAsConst(tracks)) { if (QFile::exists(track->path()) && QFile::remove(track->path())) model->removeTrack(track); @@ -151,7 +151,7 @@ void FileOps::copy(QList<PlayListTrack *> tracks, const QString &dest, MetaDataF progress.show(); progress.setAutoClose (false); int i = 0; - foreach(PlayListTrack *track, tracks) + for(const PlayListTrack *track : qAsConst(tracks)) { if (!QFile::exists(track->path())) continue; @@ -207,9 +207,9 @@ void FileOps::copy(QList<PlayListTrack *> tracks, const QString &dest, MetaDataF progress.close(); } -void FileOps::rename(QList<PlayListTrack *> tracks, MetaDataFormatter *formatter, PlayListModel *model) +void FileOps::rename(const QList<PlayListTrack *> &tracks, MetaDataFormatter *formatter, PlayListModel *model) { - foreach(PlayListTrack *track, tracks) + for(PlayListTrack *track : qAsConst(tracks)) { if (!QFile::exists(track->path())) //is it file? continue; @@ -232,7 +232,7 @@ void FileOps::rename(QList<PlayListTrack *> tracks, MetaDataFormatter *formatter } } -void FileOps::move(QList<PlayListTrack *> tracks, const QString &dest, MetaDataFormatter *formatter, PlayListModel *model) +void FileOps::move(const QList<PlayListTrack *> &tracks, const QString &dest, MetaDataFormatter *formatter, PlayListModel *model) { QProgressDialog progress(qApp->activeWindow ()); progress.setWindowModality(Qt::WindowModal); @@ -241,7 +241,7 @@ void FileOps::move(QList<PlayListTrack *> tracks, const QString &dest, MetaDataF progress.show(); progress.setAutoClose (false); int i = 0; - foreach(PlayListTrack *track, tracks) + for(PlayListTrack *track : qAsConst(tracks)) { if (!QFile::exists(track->path())) continue; |
