diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-08 11:49:28 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-08 11:49:28 +0000 |
| commit | 463f4e95cff0e100b4c8c8b5378cfe1b2604c138 (patch) | |
| tree | cb73da70a910165d5715d6fc20c11587454c4133 /src/qmmpui/playlisttask.cpp | |
| parent | 1e31fe896524513577911e382897b841e40a4814 (diff) | |
| download | qmmp-463f4e95cff0e100b4c8c8b5378cfe1b2604c138.tar.gz qmmp-463f4e95cff0e100b4c8c8b5378cfe1b2604c138.tar.bz2 qmmp-463f4e95cff0e100b4c8c8b5378cfe1b2604c138.zip | |
fixed possible regressions
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9068 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlisttask.cpp')
| -rw-r--r-- | src/qmmpui/playlisttask.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/qmmpui/playlisttask.cpp b/src/qmmpui/playlisttask.cpp index ab40c9e76..d326536f6 100644 --- a/src/qmmpui/playlisttask.cpp +++ b/src/qmmpui/playlisttask.cpp @@ -475,13 +475,18 @@ void PlayListTask::run() } //remove dublicate URLs and ignored files //this code prevents re-addition of cue tracks - for(PlayListTrack *t : qAsConst(m_new_tracks)) + QList<PlayListTrack *>::iterator it = m_new_tracks.begin(); + while(it != m_new_tracks.end()) { - if((t->path().contains("://") && urls.contains(t->path())) || - ignoredFiles.contains(t->path())) + if(((*it)->path().contains("://") && urls.contains((*it)->path())) || + ignoredFiles.contains((*it)->path())) { - m_new_tracks.removeAll(t); - delete t; + delete (*it); + it = m_new_tracks.erase(it); + } + else + { + ++it; } } } |
