Iterate QMap values

This commit is contained in:
Jonas Kvinge 2021-07-12 07:34:20 +02:00
parent 461491f742
commit e8694531f6
3 changed files with 6 additions and 3 deletions

View File

@ -1137,7 +1137,8 @@ QString QobuzRequest::ParseSong(Song &song, const QJsonObject &json_obj, QString
void QobuzRequest::GetAlbumCovers() {
for (const Song &song : songs_) {
const SongList songs = songs_.values();
for (const Song &song : songs) {
AddAlbumCoverRequest(song);
}
FlushAlbumCoverRequests();

View File

@ -109,7 +109,8 @@ void RadioServices::RefreshChannels() {
model_->Reset();
backend_->DeleteChannelsAsync();
for (RadioService *service : services_) {
QList<RadioService*> services = services_.values();
for (RadioService *service : services) {
service->GetChannels();
}

View File

@ -678,7 +678,8 @@ QString SubsonicRequest::ParseSong(Song &song, const QJsonObject &json_obj, cons
void SubsonicRequest::GetAlbumCovers() {
for (const Song &song : songs_) {
const SongList songs = songs_.values();
for (const Song &song : songs) {
if (!song.art_automatic().isEmpty()) AddAlbumCoverRequest(song);
}
FlushAlbumCoverRequests();