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

@@ -145,7 +145,7 @@ void TidalFavoriteRequest::AddFavorites(const FavoriteType type, const SongList
if (!session_id().isEmpty()) req.setRawHeader("X-Tidal-SessionId", session_id().toUtf8());
QByteArray query = url_query.toString(QUrl::FullyEncoded).toUtf8();
QNetworkReply *reply = network_->post(req, query);
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;
qLog(Debug) << "Tidal: Sending request" << url << query;
@@ -252,7 +252,7 @@ void TidalFavoriteRequest::RemoveFavorites(const FavoriteType type, const QStrin
if (!access_token().isEmpty()) req.setRawHeader("authorization", "Bearer " + access_token().toUtf8());
if (!session_id().isEmpty()) req.setRawHeader("X-Tidal-SessionId", session_id().toUtf8());
QNetworkReply *reply = network_->deleteResource(req);
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;
qLog(Debug) << "Tidal: Sending request" << url << "with" << songs.count() << "songs";