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/qmmpui/playlistparser.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/qmmpui/playlistparser.cpp')
| -rw-r--r-- | src/qmmpui/playlistparser.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qmmpui/playlistparser.cpp b/src/qmmpui/playlistparser.cpp index 55b2499ae..656000245 100644 --- a/src/qmmpui/playlistparser.cpp +++ b/src/qmmpui/playlistparser.cpp @@ -39,7 +39,7 @@ QStringList PlayListParser::nameFilters() { loadFormats(); QStringList filters; - foreach(PlayListFormat* format, *m_formats) + for(const PlayListFormat *format : qAsConst(*m_formats)) { filters << format->properties().filters; } @@ -48,7 +48,7 @@ QStringList PlayListParser::nameFilters() bool PlayListParser::isPlayList(const QString &url) { - foreach (QString filter, nameFilters()) + for(const QString &filter : nameFilters()) { QRegExp r(filter, Qt::CaseInsensitive, QRegExp::Wildcard); if(r.exactMatch(url)) @@ -60,7 +60,7 @@ bool PlayListParser::isPlayList(const QString &url) PlayListFormat *PlayListParser::findByMime(const QString &mime) { loadFormats(); - foreach(PlayListFormat* format, *m_formats) + for(PlayListFormat *format : qAsConst(*m_formats)) { if(format->properties().contentTypes.contains(mime)) return format; @@ -71,9 +71,9 @@ PlayListFormat *PlayListParser::findByMime(const QString &mime) PlayListFormat *PlayListParser::findByPath(const QString &filePath) { loadFormats(); - foreach(PlayListFormat* format, *m_formats) + for(PlayListFormat *format : qAsConst(*m_formats)) { - foreach(QString filter, format->properties().filters) + for(const QString &filter : format->properties().filters) { QRegExp r(filter, Qt::CaseInsensitive, QRegExp::Wildcard); if(r.exactMatch(filePath)) @@ -130,7 +130,7 @@ QList<PlayListTrack *> PlayListParser::loadPlaylist(const QString &f_name) } QString path; - foreach (PlayListTrack *t, tracks) + for(PlayListTrack *t : qAsConst(tracks)) { path = t->path(); @@ -149,7 +149,7 @@ QList<PlayListTrack *> PlayListParser::loadPlaylist(const QString &f_name) QList<PlayListTrack *> PlayListParser::loadPlaylist(const QString &fmt, const QByteArray &content) { - foreach (PlayListFormat *p, *m_formats) + for(PlayListFormat *p : qAsConst(*m_formats)) { if(p->properties().shortName == fmt) return p->decode(content); @@ -163,7 +163,7 @@ void PlayListParser::loadFormats() return; m_formats = new QList<PlayListFormat*>(); - foreach (QString filePath, Qmmp::findPlugins("PlayListFormats")) + for(const QString &filePath : Qmmp::findPlugins("PlayListFormats")) { QPluginLoader loader(filePath); QObject *plugin = loader.instance(); |
