Connection syntax migration (#637)

This commit is contained in:
Jonas Kvinge
2021-01-26 16:48:04 +01:00
committed by GitHub
parent d57f6303f4
commit bf7c8df353
362 changed files with 2452 additions and 2434 deletions

View File

@@ -45,7 +45,7 @@ OVHLyricsProvider::~OVHLyricsProvider() {
while (!replies_.isEmpty()) {
QNetworkReply *reply = replies_.takeFirst();
disconnect(reply, nullptr, this, nullptr);
QObject::disconnect(reply, nullptr, this, nullptr);
reply->abort();
reply->deleteLater();
}
@@ -65,7 +65,7 @@ bool OVHLyricsProvider::StartSearch(const QString &artist, const QString &album,
#endif
QNetworkReply *reply = network_->get(req);
replies_ << reply;
connect(reply, &QNetworkReply::finished, [=] { HandleSearchReply(reply, id, artist, title); });
QObject::connect(reply, &QNetworkReply::finished, [this, reply, id, artist, title]() { HandleSearchReply(reply, id, artist, title); });
//qLog(Debug) << "OVHLyrics: Sending request for" << url;
@@ -79,7 +79,7 @@ void OVHLyricsProvider::HandleSearchReply(QNetworkReply *reply, const quint64 id
if (!replies_.contains(reply)) return;
replies_.removeAll(reply);
disconnect(reply, nullptr, this, nullptr);
QObject::disconnect(reply, nullptr, this, nullptr);
reply->deleteLater();
QJsonObject json_obj = ExtractJsonObj(reply);