Use 4arg connects for networkreplies

This commit is contained in:
Jonas Kvinge
2021-03-21 00:37:17 +01:00
parent 73eebd6162
commit b224aeb0d8
30 changed files with 58 additions and 58 deletions

View File

@@ -131,7 +131,7 @@ void QobuzFavoriteRequest::AddFavorites(const FavoriteType type, const SongList
}
QNetworkReply *reply = CreateRequest("favorite/create", params);
QObject::connect(reply, &QNetworkReply::finished, [this, reply, type, songs]() { AddFavoritesReply(reply, type, songs); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, type, songs]() { AddFavoritesReply(reply, type, songs); });
replies_ << reply;
}
@@ -233,7 +233,7 @@ void QobuzFavoriteRequest::RemoveFavorites(const FavoriteType type, const SongLi
}
QNetworkReply *reply = CreateRequest("favorite/delete", params);
QObject::connect(reply, &QNetworkReply::finished, [this, reply, type, songs]() { RemoveFavoritesReply(reply, type, songs); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, type, songs]() { RemoveFavoritesReply(reply, type, songs); });
replies_ << reply;
}

View File

@@ -169,7 +169,7 @@ void QobuzRequest::FlushArtistsRequests() {
}
if (!reply) continue;
replies_ << reply;
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { ArtistsReplyReceived(reply, request.limit, request.offset); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { ArtistsReplyReceived(reply, request.limit, request.offset); });
}
@@ -217,7 +217,7 @@ void QobuzRequest::FlushAlbumsRequests() {
}
if (!reply) continue;
replies_ << reply;
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumsReplyReceived(reply, request.limit, request.offset); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumsReplyReceived(reply, request.limit, request.offset); });
}
@@ -265,7 +265,7 @@ void QobuzRequest::FlushSongsRequests() {
}
if (!reply) continue;
replies_ << reply;
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { SongsReplyReceived(reply, request.limit, request.offset); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { SongsReplyReceived(reply, request.limit, request.offset); });
}
@@ -503,7 +503,7 @@ void QobuzRequest::FlushArtistAlbumsRequests() {
if (request.offset > 0) params << Param("offset", QString::number(request.offset));
QNetworkReply *reply = CreateRequest(QString("artist/get"), params);
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { ArtistAlbumsReplyReceived(reply, request.artist_id, request.offset); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { ArtistAlbumsReplyReceived(reply, request.artist_id, request.offset); });
replies_ << reply;
}
@@ -757,7 +757,7 @@ void QobuzRequest::FlushAlbumSongsRequests() {
if (request.offset > 0) params << Param("offset", QString::number(request.offset));
QNetworkReply *reply = CreateRequest(QString("album/get"), params);
replies_ << reply;
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumSongsReplyReceived(reply, request.artist_id, request.album_id, request.offset, request.album_artist, request.album); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumSongsReplyReceived(reply, request.artist_id, request.album_id, request.offset, request.album_artist, request.album); });
}
@@ -1189,7 +1189,7 @@ void QobuzRequest::FlushAlbumCoverRequests() {
#endif
QNetworkReply *reply = network_->get(req);
album_cover_replies_ << reply;
QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumCoverReceived(reply, request.url, request.filename); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumCoverReceived(reply, request.url, request.filename); });
}

View File

@@ -283,7 +283,7 @@ void QobuzService::SendLoginWithCredentials(const QString &app_id, const QString
QNetworkReply *reply = network_->post(req, query);
replies_ << reply;
QObject::connect(reply, &QNetworkReply::sslErrors, this, &QobuzService::HandleLoginSSLErrors);
QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { HandleAuthReply(reply); });
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { HandleAuthReply(reply); });
qLog(Debug) << "Qobuz: Sending request" << url << query;