From b224aeb0d83dc7d0ed79eea66bfba6c7fadb9a9b Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 21 Mar 2021 00:37:17 +0100 Subject: [PATCH] Use 4arg connects for networkreplies --- src/covermanager/albumcoverfetchersearch.cpp | 2 +- src/covermanager/albumcoverloader.cpp | 4 ++-- src/covermanager/deezercoverprovider.cpp | 2 +- src/covermanager/discogscoverprovider.cpp | 4 ++-- src/covermanager/lastfmcoverprovider.cpp | 2 +- src/covermanager/musicbrainzcoverprovider.cpp | 2 +- src/covermanager/musixmatchcoverprovider.cpp | 2 +- src/covermanager/qobuzcoverprovider.cpp | 2 +- src/covermanager/spotifycoverprovider.cpp | 4 ++-- src/covermanager/tidalcoverprovider.cpp | 2 +- src/lyrics/auddlyricsprovider.cpp | 2 +- src/lyrics/chartlyricsprovider.cpp | 2 +- src/lyrics/geniuslyricsprovider.cpp | 6 +++--- src/lyrics/lololyricsprovider.cpp | 2 +- src/lyrics/musixmatchlyricsprovider.cpp | 2 +- src/lyrics/ovhlyricsprovider.cpp | 2 +- src/musicbrainz/acoustidclient.cpp | 2 +- src/musicbrainz/musicbrainzclient.cpp | 4 ++-- src/qobuz/qobuzfavoriterequest.cpp | 4 ++-- src/qobuz/qobuzrequest.cpp | 12 ++++++------ src/qobuz/qobuzservice.cpp | 2 +- src/scrobbler/lastfmimport.cpp | 4 ++-- src/scrobbler/listenbrainzscrobbler.cpp | 6 +++--- src/scrobbler/scrobblingapi20.cpp | 10 +++++----- src/subsonic/subsonicrequest.cpp | 6 +++--- src/subsonic/subsonicscrobblerequest.cpp | 2 +- src/subsonic/subsonicservice.cpp | 2 +- src/tidal/tidalfavoriterequest.cpp | 4 ++-- src/tidal/tidalrequest.cpp | 12 ++++++------ src/tidal/tidalservice.cpp | 4 ++-- 30 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/covermanager/albumcoverfetchersearch.cpp b/src/covermanager/albumcoverfetchersearch.cpp index 70e1d3ae9..ac43c56b0 100644 --- a/src/covermanager/albumcoverfetchersearch.cpp +++ b/src/covermanager/albumcoverfetchersearch.cpp @@ -288,7 +288,7 @@ void AlbumCoverFetcherSearch::FetchMoreImages() { req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); #endif QNetworkReply *image_reply = network_->get(req); - QObject::connect(image_reply, &QNetworkReply::finished, [this, image_reply]() { ProviderCoverFetchFinished(image_reply); }); + QObject::connect(image_reply, &QNetworkReply::finished, this, [this, image_reply]() { ProviderCoverFetchFinished(image_reply); }); pending_image_loads_[image_reply] = result; image_load_timeout_->AddReply(image_reply); diff --git a/src/covermanager/albumcoverloader.cpp b/src/covermanager/albumcoverloader.cpp index 04dab9ef6..0580d2249 100644 --- a/src/covermanager/albumcoverloader.cpp +++ b/src/covermanager/albumcoverloader.cpp @@ -468,7 +468,7 @@ AlbumCoverLoader::TryLoadResult AlbumCoverLoader::TryLoadImage(Task *task) { request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); #endif QNetworkReply *reply = network_->get(request); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, cover_url]() { RemoteFetchFinished(reply, cover_url); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, cover_url]() { RemoteFetchFinished(reply, cover_url); }); remote_tasks_.insert(reply, *task); return TryLoadResult(true, false, type, AlbumCoverImageResult(cover_url)); @@ -500,7 +500,7 @@ void AlbumCoverLoader::RemoteFetchFinished(QNetworkReply *reply, const QUrl &cov #endif request.setUrl(redirect.toUrl()); QNetworkReply *redirected_reply = network_->get(request); - QObject::connect(redirected_reply, &QNetworkReply::finished, [this, redirected_reply, redirect]() { RemoteFetchFinished(redirected_reply, redirect.toUrl()); }); + QObject::connect(redirected_reply, &QNetworkReply::finished, this, [this, redirected_reply, redirect]() { RemoteFetchFinished(redirected_reply, redirect.toUrl()); }); remote_tasks_.insert(redirected_reply, task); return; diff --git a/src/covermanager/deezercoverprovider.cpp b/src/covermanager/deezercoverprovider.cpp index ab749e0ce..74b15dc82 100644 --- a/src/covermanager/deezercoverprovider.cpp +++ b/src/covermanager/deezercoverprovider.cpp @@ -107,7 +107,7 @@ bool DeezerCoverProvider::StartSearch(const QString &artist, const QString &albu #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { HandleSearchReply(reply, id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id]() { HandleSearchReply(reply, id); }); return true; diff --git a/src/covermanager/discogscoverprovider.cpp b/src/covermanager/discogscoverprovider.cpp index 0a6ad49e4..4090e6b59 100644 --- a/src/covermanager/discogscoverprovider.cpp +++ b/src/covermanager/discogscoverprovider.cpp @@ -144,7 +144,7 @@ void DiscogsCoverProvider::SendSearchRequest(std::shared_ptrid); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, search]() { HandleSearchReply(reply, search->id); }); } @@ -331,7 +331,7 @@ void DiscogsCoverProvider::StartReleaseRequest(std::shared_ptrpost(req, url_query.toString(QUrl::FullyEncoded).toUtf8()); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, type]() { QueryFinished(reply, id, type); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, type]() { QueryFinished(reply, id, type); }); return true; diff --git a/src/covermanager/musicbrainzcoverprovider.cpp b/src/covermanager/musicbrainzcoverprovider.cpp index b94c66f92..b31dca673 100644 --- a/src/covermanager/musicbrainzcoverprovider.cpp +++ b/src/covermanager/musicbrainzcoverprovider.cpp @@ -106,7 +106,7 @@ void MusicbrainzCoverProvider::SendSearchRequest(const SearchRequest &request) { #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { HandleSearchReply(reply, request.id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { HandleSearchReply(reply, request.id); }); } diff --git a/src/covermanager/musixmatchcoverprovider.cpp b/src/covermanager/musixmatchcoverprovider.cpp index b125e1505..1cfb7d3e7 100644 --- a/src/covermanager/musixmatchcoverprovider.cpp +++ b/src/covermanager/musixmatchcoverprovider.cpp @@ -88,7 +88,7 @@ bool MusixmatchCoverProvider::StartSearch(const QString &artist, const QString & #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, album]() { HandleSearchReply(reply, id, artist, album); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, album]() { HandleSearchReply(reply, id, artist, album); }); //qLog(Debug) << "Musixmatch: Sending request for" << artist_stripped << album_stripped << url; diff --git a/src/covermanager/qobuzcoverprovider.cpp b/src/covermanager/qobuzcoverprovider.cpp index f346acdf7..12b353c25 100644 --- a/src/covermanager/qobuzcoverprovider.cpp +++ b/src/covermanager/qobuzcoverprovider.cpp @@ -111,7 +111,7 @@ bool QobuzCoverProvider::StartSearch(const QString &artist, const QString &album req.setRawHeader("X-User-Auth-Token", user_auth_token_.toUtf8()); QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { HandleSearchReply(reply, id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id]() { HandleSearchReply(reply, id); }); return true; diff --git a/src/covermanager/spotifycoverprovider.cpp b/src/covermanager/spotifycoverprovider.cpp index 344b1cae6..c10bf1a4f 100644 --- a/src/covermanager/spotifycoverprovider.cpp +++ b/src/covermanager/spotifycoverprovider.cpp @@ -247,7 +247,7 @@ void SpotifyCoverProvider::RequestAccessToken(const QString code, const QUrl red QNetworkReply *reply = network_->post(req, query); replies_ << reply; QObject::connect(reply, &QNetworkReply::sslErrors, this, &SpotifyCoverProvider::HandleLoginSSLErrors); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { AccessTokenRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { AccessTokenRequestFinished(reply); }); } @@ -402,7 +402,7 @@ bool SpotifyCoverProvider::StartSearch(const QString &artist, const QString &alb QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, extract]() { HandleSearchReply(reply, id, extract); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, extract]() { HandleSearchReply(reply, id, extract); }); return true; diff --git a/src/covermanager/tidalcoverprovider.cpp b/src/covermanager/tidalcoverprovider.cpp index a24f3f104..65be9d643 100644 --- a/src/covermanager/tidalcoverprovider.cpp +++ b/src/covermanager/tidalcoverprovider.cpp @@ -117,7 +117,7 @@ bool TidalCoverProvider::StartSearch(const QString &artist, const QString &album QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { HandleSearchReply(reply, id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id]() { HandleSearchReply(reply, id); }); return true; diff --git a/src/lyrics/auddlyricsprovider.cpp b/src/lyrics/auddlyricsprovider.cpp index 03f330df0..c9ad8a021 100644 --- a/src/lyrics/auddlyricsprovider.cpp +++ b/src/lyrics/auddlyricsprovider.cpp @@ -82,7 +82,7 @@ bool AuddLyricsProvider::StartSearch(const QString &artist, const QString &album #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); //qLog(Debug) << "AudDLyrics: Sending request for" << url; diff --git a/src/lyrics/chartlyricsprovider.cpp b/src/lyrics/chartlyricsprovider.cpp index 847829340..a350087b2 100644 --- a/src/lyrics/chartlyricsprovider.cpp +++ b/src/lyrics/chartlyricsprovider.cpp @@ -74,7 +74,7 @@ bool ChartLyricsProvider::StartSearch(const QString &artist, const QString&, con #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); //qLog(Debug) << "ChartLyrics: Sending request for" << url; diff --git a/src/lyrics/geniuslyricsprovider.cpp b/src/lyrics/geniuslyricsprovider.cpp index a95a31259..0391a4865 100644 --- a/src/lyrics/geniuslyricsprovider.cpp +++ b/src/lyrics/geniuslyricsprovider.cpp @@ -199,7 +199,7 @@ void GeniusLyricsProvider::RequestAccessToken(const QUrl &url, const QUrl &redir QNetworkReply *reply = network_->post(req, query); replies_ << reply; QObject::connect(reply, &QNetworkReply::sslErrors, this, &GeniusLyricsProvider::HandleLoginSSLErrors); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { AccessTokenRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { AccessTokenRequestFinished(reply); }); } @@ -333,7 +333,7 @@ bool GeniusLyricsProvider::StartSearch(const QString &artist, const QString &alb req.setRawHeader("Authorization", "Bearer " + access_token_.toUtf8()); QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { HandleSearchReply(reply, id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id]() { HandleSearchReply(reply, id); }); //qLog(Debug) << "GeniusLyrics: Sending request for" << url; @@ -454,7 +454,7 @@ void GeniusLyricsProvider::HandleSearchReply(QNetworkReply *reply, const quint64 #endif QNetworkReply *new_reply = network_->get(req); replies_ << new_reply; - QObject::connect(new_reply, &QNetworkReply::finished, [this, new_reply, search, url]() { HandleLyricReply(new_reply, search->id, url); }); + QObject::connect(new_reply, &QNetworkReply::finished, this, [this, new_reply, search, url]() { HandleLyricReply(new_reply, search->id, url); }); } diff --git a/src/lyrics/lololyricsprovider.cpp b/src/lyrics/lololyricsprovider.cpp index 4d457a1e7..75590ad05 100644 --- a/src/lyrics/lololyricsprovider.cpp +++ b/src/lyrics/lololyricsprovider.cpp @@ -77,7 +77,7 @@ bool LoloLyricsProvider::StartSearch(const QString &artist, const QString &album #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); //qLog(Debug) << "LoloLyrics: Sending request for" << url; diff --git a/src/lyrics/musixmatchlyricsprovider.cpp b/src/lyrics/musixmatchlyricsprovider.cpp index a434e3343..00869bdb9 100644 --- a/src/lyrics/musixmatchlyricsprovider.cpp +++ b/src/lyrics/musixmatchlyricsprovider.cpp @@ -86,7 +86,7 @@ bool MusixmatchLyricsProvider::StartSearch(const QString &artist, const QString #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, album, title]() { HandleSearchReply(reply, id, artist, album, title); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, album, title]() { HandleSearchReply(reply, id, artist, album, title); }); qLog(Debug) << "MusixmatchLyrics: Sending request for" << artist_stripped << title_stripped << url; diff --git a/src/lyrics/ovhlyricsprovider.cpp b/src/lyrics/ovhlyricsprovider.cpp index ccd9b6e29..14f3aae7d 100644 --- a/src/lyrics/ovhlyricsprovider.cpp +++ b/src/lyrics/ovhlyricsprovider.cpp @@ -65,7 +65,7 @@ bool OVHLyricsProvider::StartSearch(const QString &artist, const QString &album, #endif QNetworkReply *reply = network_->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); }); //qLog(Debug) << "OVHLyrics: Sending request for" << url; diff --git a/src/musicbrainz/acoustidclient.cpp b/src/musicbrainz/acoustidclient.cpp index e5d4b7093..2aa25b760 100644 --- a/src/musicbrainz/acoustidclient.cpp +++ b/src/musicbrainz/acoustidclient.cpp @@ -89,7 +89,7 @@ void AcoustidClient::Start(const int id, const QString &fingerprint, int duratio req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); #endif QNetworkReply *reply = network_->get(req); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { RequestFinished(reply, id); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id]() { RequestFinished(reply, id); }); requests_[id] = reply; timeouts_->AddReply(reply); diff --git a/src/musicbrainz/musicbrainzclient.cpp b/src/musicbrainz/musicbrainzclient.cpp index f44e78e4c..cb920e27f 100644 --- a/src/musicbrainz/musicbrainzclient.cpp +++ b/src/musicbrainz/musicbrainzclient.cpp @@ -167,7 +167,7 @@ void MusicBrainzClient::StartDiscIdRequest(const QString &discid) { req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); #endif QNetworkReply *reply = network_->get(req); - QObject::connect(reply, &QNetworkReply::finished, [this, discid, reply]() { DiscIdRequestFinished(discid, reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, discid, reply]() { DiscIdRequestFinished(discid, reply); }); timeouts_->AddReply(reply); @@ -193,7 +193,7 @@ void MusicBrainzClient::FlushRequests() { req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); #endif QNetworkReply *reply = network_->get(req); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { RequestFinished(reply, request.id, request.number); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { RequestFinished(reply, request.id, request.number); }); requests_.insert(request.id, reply); timeouts_->AddReply(reply); diff --git a/src/qobuz/qobuzfavoriterequest.cpp b/src/qobuz/qobuzfavoriterequest.cpp index 8d98a6c27..cd5ec774b 100644 --- a/src/qobuz/qobuzfavoriterequest.cpp +++ b/src/qobuz/qobuzfavoriterequest.cpp @@ -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; } diff --git a/src/qobuz/qobuzrequest.cpp b/src/qobuz/qobuzrequest.cpp index ae70844c7..d5eab5147 100644 --- a/src/qobuz/qobuzrequest.cpp +++ b/src/qobuz/qobuzrequest.cpp @@ -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); }); } diff --git a/src/qobuz/qobuzservice.cpp b/src/qobuz/qobuzservice.cpp index 9136523be..7700c7e2e 100644 --- a/src/qobuz/qobuzservice.cpp +++ b/src/qobuz/qobuzservice.cpp @@ -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; diff --git a/src/scrobbler/lastfmimport.cpp b/src/scrobbler/lastfmimport.cpp index 19bf467ba..b44500826 100644 --- a/src/scrobbler/lastfmimport.cpp +++ b/src/scrobbler/lastfmimport.cpp @@ -269,7 +269,7 @@ void LastFMImport::SendGetRecentTracksRequest(GetRecentTracksRequest request) { } QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { GetRecentTracksRequestFinished(reply, request.page); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { GetRecentTracksRequestFinished(reply, request.page); }); } @@ -432,7 +432,7 @@ void LastFMImport::SendGetTopTracksRequest(GetTopTracksRequest request) { } QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { GetTopTracksRequestFinished(reply, request.page); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { GetTopTracksRequestFinished(reply, request.page); }); } diff --git a/src/scrobbler/listenbrainzscrobbler.cpp b/src/scrobbler/listenbrainzscrobbler.cpp index c3c2b4453..f91212299 100644 --- a/src/scrobbler/listenbrainzscrobbler.cpp +++ b/src/scrobbler/listenbrainzscrobbler.cpp @@ -253,7 +253,7 @@ void ListenBrainzScrobbler::RequestAccessToken(const QUrl &redirect_url, const Q QByteArray query = url_query.toString(QUrl::FullyEncoded).toUtf8(); QNetworkReply *reply = network_->post(req, query); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { AuthenticateReplyFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { AuthenticateReplyFinished(reply); }); } @@ -457,7 +457,7 @@ void ListenBrainzScrobbler::UpdateNowPlaying(const Song &song) { QUrl url(QString("%1/1/submit-listens").arg(kApiUrl)); QNetworkReply *reply = CreateRequest(url, doc); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { UpdateNowPlayingRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { UpdateNowPlayingRequestFinished(reply); }); } @@ -583,7 +583,7 @@ void ListenBrainzScrobbler::Submit() { QUrl url(QString("%1/1/submit-listens").arg(kApiUrl)); QNetworkReply *reply = CreateRequest(url, doc); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, list]() { ScrobbleRequestFinished(reply, list); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, list]() { ScrobbleRequestFinished(reply, list); }); } diff --git a/src/scrobbler/scrobblingapi20.cpp b/src/scrobbler/scrobblingapi20.cpp index 0b8506848..61c9f3eb1 100644 --- a/src/scrobbler/scrobblingapi20.cpp +++ b/src/scrobbler/scrobblingapi20.cpp @@ -257,7 +257,7 @@ void ScrobblingAPI20::RequestSession(const QString &token) { #endif QNetworkReply *reply = network()->get(req); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { AuthenticateReplyFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { AuthenticateReplyFinished(reply); }); } @@ -484,7 +484,7 @@ void ScrobblingAPI20::UpdateNowPlaying(const Song &song) { params << Param("albumArtist", song.albumartist()); QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { UpdateNowPlayingRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { UpdateNowPlayingRequestFinished(reply); }); } @@ -607,7 +607,7 @@ void ScrobblingAPI20::Submit() { if (!batch_ || i <= 0) return; QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, list]() { ScrobbleRequestFinished(reply, list); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, list]() { ScrobbleRequestFinished(reply, list); }); } @@ -800,7 +800,7 @@ void ScrobblingAPI20::SendSingleScrobble(ScrobblerCacheItemPtr item) { params << Param("trackNumber", QString::number(item->track_)); QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, item]() { SingleScrobbleRequestFinished(reply, item->timestamp_); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, item]() { SingleScrobbleRequestFinished(reply, item->timestamp_); }); } @@ -951,7 +951,7 @@ void ScrobblingAPI20::Love() { params << Param("albumArtist", song_playing_.albumartist()); QNetworkReply *reply = CreateRequest(params); - QObject::connect(reply, &QNetworkReply::finished, [this, reply] { LoveRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply] { LoveRequestFinished(reply); }); } diff --git a/src/subsonic/subsonicrequest.cpp b/src/subsonic/subsonicrequest.cpp index f4f2b8cf7..34d40a3fc 100644 --- a/src/subsonic/subsonicrequest.cpp +++ b/src/subsonic/subsonicrequest.cpp @@ -156,7 +156,7 @@ void SubsonicRequest::FlushAlbumsRequests() { QNetworkReply *reply; reply = CreateGetRequest(QString("getAlbumList2"), params); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumsReplyReceived(reply, request.offset); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumsReplyReceived(reply, request.offset); }); } @@ -350,7 +350,7 @@ void SubsonicRequest::FlushAlbumSongsRequests() { ParamList params = ParamList() << Param("id", request.album_id); QNetworkReply *reply = CreateGetRequest(QString("getAlbum"), params); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumSongsReplyReceived(reply, request.artist_id, request.album_id, request.album_artist); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumSongsReplyReceived(reply, request.artist_id, request.album_id, request.album_artist); }); } @@ -743,7 +743,7 @@ void SubsonicRequest::FlushAlbumCoverRequests() { 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); }); } diff --git a/src/subsonic/subsonicscrobblerequest.cpp b/src/subsonic/subsonicscrobblerequest.cpp index f59c9e551..6641b1e06 100644 --- a/src/subsonic/subsonicscrobblerequest.cpp +++ b/src/subsonic/subsonicscrobblerequest.cpp @@ -84,7 +84,7 @@ void SubsonicScrobbleRequest::FlushScrobbleRequests() { QNetworkReply *reply; reply = CreateGetRequest(QString("scrobble"), params); replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { ScrobbleReplyReceived(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { ScrobbleReplyReceived(reply); }); } diff --git a/src/subsonic/subsonicservice.cpp b/src/subsonic/subsonicservice.cpp index 9af2aac44..d53f45bde 100644 --- a/src/subsonic/subsonicservice.cpp +++ b/src/subsonic/subsonicservice.cpp @@ -200,7 +200,7 @@ void SubsonicService::SendPingWithCredentials(QUrl url, const QString &username, QNetworkReply *reply = network_->get(req); replies_ << reply; QObject::connect(reply, &QNetworkReply::sslErrors, this, &SubsonicService::HandlePingSSLErrors); - QObject::connect(reply, &QNetworkReply::finished, [this, reply, url, username, password]() { HandlePingReply(reply, url, username, password); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, url, username, password]() { HandlePingReply(reply, url, username, password); }); //qLog(Debug) << "Subsonic: Sending request" << url << query; diff --git a/src/tidal/tidalfavoriterequest.cpp b/src/tidal/tidalfavoriterequest.cpp index c324f7385..27ff52cdf 100644 --- a/src/tidal/tidalfavoriterequest.cpp +++ b/src/tidal/tidalfavoriterequest.cpp @@ -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"; diff --git a/src/tidal/tidalrequest.cpp b/src/tidal/tidalrequest.cpp index 481d5b745..36699159f 100644 --- a/src/tidal/tidalrequest.cpp +++ b/src/tidal/tidalrequest.cpp @@ -190,7 +190,7 @@ void TidalRequest::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); }); } @@ -234,7 +234,7 @@ void TidalRequest::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); }); } @@ -278,7 +278,7 @@ void TidalRequest::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); }); } @@ -501,7 +501,7 @@ void TidalRequest::FlushArtistAlbumsRequests() { ParamList parameters; if (request.offset > 0) parameters << Param("offset", QString::number(request.offset)); QNetworkReply *reply = CreateRequest(QString("artists/%1/albums").arg(request.artist_id), parameters); - 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; } @@ -784,7 +784,7 @@ void TidalRequest::FlushAlbumSongsRequests() { if (request.offset > 0) parameters << Param("offset", QString::number(request.offset)); QNetworkReply *reply = CreateRequest(QString("albums/%1/tracks").arg(request.album_id), parameters); 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, request.album_explicit); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumSongsReplyReceived(reply, request.artist_id, request.album_id, request.offset, request.album_artist, request.album, request.album_explicit); }); } @@ -1142,7 +1142,7 @@ void TidalRequest::FlushAlbumCoverRequests() { #endif QNetworkReply *reply = network_->get(req); album_cover_replies_ << reply; - QObject::connect(reply, &QNetworkReply::finished, [this, reply, request]() { AlbumCoverReceived(reply, request.album_id, request.url, request.filename); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, request]() { AlbumCoverReceived(reply, request.album_id, request.url, request.filename); }); } diff --git a/src/tidal/tidalservice.cpp b/src/tidal/tidalservice.cpp index 58b41258d..b832d4125 100644 --- a/src/tidal/tidalservice.cpp +++ b/src/tidal/tidalservice.cpp @@ -403,7 +403,7 @@ void TidalService::RequestAccessToken(const QString &code) { QNetworkReply *reply = network_->post(req, query); replies_ << reply; QObject::connect(reply, &QNetworkReply::sslErrors, this, &TidalService::HandleLoginSSLErrors); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { AccessTokenRequestFinished(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { AccessTokenRequestFinished(reply); }); } @@ -555,7 +555,7 @@ void TidalService::SendLoginWithCredentials(const QString &api_token, const QStr QByteArray query = url_query.toString(QUrl::FullyEncoded).toUtf8(); QNetworkReply *reply = network_->post(req, query); QObject::connect(reply, &QNetworkReply::sslErrors, this, &TidalService::HandleLoginSSLErrors); - QObject::connect(reply, &QNetworkReply::finished, [this, reply]() { HandleAuthReply(reply); }); + QObject::connect(reply, &QNetworkReply::finished, this, [this, reply]() { HandleAuthReply(reply); }); replies_ << reply; //qLog(Debug) << "Tidal: Sending request" << url << query;