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

@@ -88,7 +88,7 @@ void AcoustidClient::Start(const int id, const QString &fingerprint, int duratio
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif
QNetworkReply *reply = network_->get(req);
connect(reply, &QNetworkReply::finished, [=] { RequestFinished(reply, id); });
QObject::connect(reply, &QNetworkReply::finished, [this, reply, id]() { RequestFinished(reply, id); });
requests_[id] = reply;
timeouts_->AddReply(reply);
@@ -126,7 +126,7 @@ struct IdSource {
void AcoustidClient::RequestFinished(QNetworkReply *reply, const int request_id) {
disconnect(reply, nullptr, this, nullptr);
QObject::disconnect(reply, nullptr, this, nullptr);
reply->deleteLater();
requests_.remove(request_id);