Use QJsonValueRef

This commit is contained in:
Jonas Kvinge
2021-03-26 22:10:43 +01:00
parent 14fb647647
commit 91ab8e22b7
16 changed files with 50 additions and 48 deletions

View File

@@ -169,11 +169,11 @@ void AcoustidClient::RequestFinished(QNetworkReply *reply, const int request_id)
// List of <id, nb of sources> pairs
QList<IdSource> id_source_list;
for (const QJsonValue v : json_results) {
for (const QJsonValueRef v : json_results) {
QJsonObject r = v.toObject();
if (!r["recordings"].isUndefined()) {
QJsonArray json_recordings = r["recordings"].toArray();
for (const QJsonValue recording : json_recordings) {
for (const QJsonValueRef recording : json_recordings) {
QJsonObject o = recording.toObject();
if (!o["id"].isUndefined()) {
id_source_list << IdSource(o["id"].toString(), o["sources"].toInt());