mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
parent
b83c8e2735
commit
98082d1064
|
@ -54,11 +54,11 @@ public:
|
||||||
[worker, onFinished = std::move(onFinished), request = std::move(request)]() {
|
[worker, onFinished = std::move(onFinished), request = std::move(request)]() {
|
||||||
QNetworkReply *reply = NetworkManager::NaM.get(request);
|
QNetworkReply *reply = NetworkManager::NaM.get(request);
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished,
|
reply->connect(reply, &QNetworkReply::finished,
|
||||||
[worker, reply, onFinished = std::move(onFinished)]() {
|
[worker, reply, onFinished = std::move(onFinished)]() {
|
||||||
onFinished(reply);
|
onFinished(reply);
|
||||||
delete worker;
|
delete worker;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
emit requester.requestUrl();
|
emit requester.requestUrl();
|
||||||
|
@ -84,8 +84,8 @@ public:
|
||||||
|
|
||||||
onReplyCreated(reply);
|
onReplyCreated(reply);
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished, worker,
|
reply->connect(reply, &QNetworkReply::finished, worker,
|
||||||
[=]() { emit worker->doneUrl(reply); });
|
[=]() { emit worker->doneUrl(reply); });
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(worker, &NetworkWorker::doneUrl, caller, [=](QNetworkReply *reply) {
|
QObject::connect(worker, &NetworkWorker::doneUrl, caller, [=](QNetworkReply *reply) {
|
||||||
|
@ -114,11 +114,11 @@ public:
|
||||||
[worker, data, onFinished = std::move(onFinished), request = std::move(request)]() {
|
[worker, data, onFinished = std::move(onFinished), request = std::move(request)]() {
|
||||||
QNetworkReply *reply = NetworkManager::NaM.put(request, *data);
|
QNetworkReply *reply = NetworkManager::NaM.put(request, *data);
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished,
|
reply->connect(reply, &QNetworkReply::finished,
|
||||||
[worker, reply, onFinished = std::move(onFinished)]() {
|
[worker, reply, onFinished = std::move(onFinished)]() {
|
||||||
onFinished(reply);
|
onFinished(reply);
|
||||||
delete worker;
|
delete worker;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
emit requester.requestUrl();
|
emit requester.requestUrl();
|
||||||
|
@ -136,11 +136,11 @@ public:
|
||||||
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
||||||
QNetworkReply *reply = NetworkManager::NaM.put(request, "");
|
QNetworkReply *reply = NetworkManager::NaM.put(request, "");
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished,
|
reply->connect(reply, &QNetworkReply::finished,
|
||||||
[onFinished = std::move(onFinished), reply, worker]() {
|
[onFinished = std::move(onFinished), reply, worker]() {
|
||||||
onFinished(reply);
|
onFinished(reply);
|
||||||
delete worker;
|
delete worker;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
emit requester.requestUrl();
|
emit requester.requestUrl();
|
||||||
|
@ -158,11 +158,11 @@ public:
|
||||||
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
[onFinished = std::move(onFinished), request = std::move(request), worker]() {
|
||||||
QNetworkReply *reply = NetworkManager::NaM.deleteResource(request);
|
QNetworkReply *reply = NetworkManager::NaM.deleteResource(request);
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished,
|
reply->connect(reply, &QNetworkReply::finished,
|
||||||
[onFinished = std::move(onFinished), reply, worker]() {
|
[onFinished = std::move(onFinished), reply, worker]() {
|
||||||
onFinished(reply);
|
onFinished(reply);
|
||||||
delete worker;
|
delete worker;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
emit requester.requestUrl();
|
emit requester.requestUrl();
|
||||||
|
|
Loading…
Reference in a new issue