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/Engines/mplayer/mplayerengine.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/Engines/mplayer/mplayerengine.cpp')
| -rw-r--r-- | src/plugins/Engines/mplayer/mplayerengine.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/Engines/mplayer/mplayerengine.cpp b/src/plugins/Engines/mplayer/mplayerengine.cpp index 70c2097b5..90b69cfd5 100644 --- a/src/plugins/Engines/mplayer/mplayerengine.cpp +++ b/src/plugins/Engines/mplayer/mplayerengine.cpp @@ -66,7 +66,7 @@ TrackInfo *MplayerInfo::createTrackInfo(const QString &path) QString str = QString::fromLocal8Bit(mplayer_process.readAll()).trimmed(); TrackInfo *info = new TrackInfo(path); QStringList lines = str.split("\n"); - foreach(QString line, lines) + for(const QString &line : qAsConst(lines)) { if(rx_id_length.indexIn(line) > -1) info->setDuration((qint64) rx_id_length.cap(1).toDouble() * 1000); @@ -124,7 +124,7 @@ bool MplayerEngine::enqueue(InputSource *source) { QStringList filters = MplayerInfo::filters(); bool supports = false; - foreach(QString filter, filters) + for(const QString &filter : qAsConst(filters)) { QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); supports = regexp.exactMatch(source->path()); @@ -203,9 +203,8 @@ void MplayerEngine::setMuted(bool muted) void MplayerEngine::readStdOut() { - QString line = QString::fromLocal8Bit(m_process->readAll ()).trimmed(); - QStringList lines = line.split("\n"); - foreach(line, lines) + const QStringList lines = QString::fromLocal8Bit(m_process->readAll()).trimmed().split("\n"); + for(const QString &line : lines) { if (rx_av.indexIn(line) > -1) { |
