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

@@ -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;

View File

@@ -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;

View File

@@ -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); });
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;