Iterate QMap values
This commit is contained in:
parent
461491f742
commit
e8694531f6
|
@ -1137,7 +1137,8 @@ QString QobuzRequest::ParseSong(Song &song, const QJsonObject &json_obj, QString
|
||||||
|
|
||||||
void QobuzRequest::GetAlbumCovers() {
|
void QobuzRequest::GetAlbumCovers() {
|
||||||
|
|
||||||
for (const Song &song : songs_) {
|
const SongList songs = songs_.values();
|
||||||
|
for (const Song &song : songs) {
|
||||||
AddAlbumCoverRequest(song);
|
AddAlbumCoverRequest(song);
|
||||||
}
|
}
|
||||||
FlushAlbumCoverRequests();
|
FlushAlbumCoverRequests();
|
||||||
|
|
|
@ -109,7 +109,8 @@ void RadioServices::RefreshChannels() {
|
||||||
model_->Reset();
|
model_->Reset();
|
||||||
backend_->DeleteChannelsAsync();
|
backend_->DeleteChannelsAsync();
|
||||||
|
|
||||||
for (RadioService *service : services_) {
|
QList<RadioService*> services = services_.values();
|
||||||
|
for (RadioService *service : services) {
|
||||||
service->GetChannels();
|
service->GetChannels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -678,7 +678,8 @@ QString SubsonicRequest::ParseSong(Song &song, const QJsonObject &json_obj, cons
|
||||||
|
|
||||||
void SubsonicRequest::GetAlbumCovers() {
|
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);
|
if (!song.art_automatic().isEmpty()) AddAlbumCoverRequest(song);
|
||||||
}
|
}
|
||||||
FlushAlbumCoverRequests();
|
FlushAlbumCoverRequests();
|
||||||
|
|
Loading…
Reference in New Issue