-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Update HttpRequest.cpp.mustache - use stable 4-parameter connect #18893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
1afbc5e
1d4e78a
edcf3d5
ca9abb8
d647327
6f0b374
f863876
f1a5215
e0659d4
112a0cf
b7e3d20
5e148f4
abfce2f
30ffe54
8ee4526
5dacbd5
3fbc375
b1298f0
bc64138
9361be6
43fa200
904732c
898b52a
b1f3b18
209600d
6a2f2ee
2c39e6f
c7e3b77
24d6c67
86d5104
d954acb
fe5315a
c8985f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -383,12 +383,12 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) { | |||||
| } | ||||||
| if (reply != nullptr) { | ||||||
| reply->setParent(this); | ||||||
| connect(reply, &QNetworkReply::finished, [this, reply] { | ||||||
| connect(reply, &QNetworkReply::finished, this, [this, reply] () { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| on_reply_finished(reply); | ||||||
| }); | ||||||
| } | ||||||
| if (timeOutTimer.interval() > 0) { | ||||||
| QObject::connect(&timeOutTimer, &QTimer::timeout, [this, reply] { | ||||||
| QObject::connect(&timeOutTimer, &QTimer::timeout, this, [this, reply] () { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| on_reply_timeout(reply); | ||||||
| }); | ||||||
| timeOutTimer.start(); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -277,7 +277,7 @@ void PFXPetApi::addPet(const PFXPet &pfx_pet) { | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::addPetCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -495,7 +495,7 @@ void PFXPetApi::deletePet(const qint64 &pet_id, const ::test_namespace::Optional | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::deletePetCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -695,7 +695,7 @@ void PFXPetApi::findPetsByStatus(const QList<QString> &status) { | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByStatusCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Jazzco marked this conversation as resolved.
Outdated
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -905,7 +905,7 @@ void PFXPetApi::findPetsByTags(const QList<QString> &tags) { | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByTagsCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Jazzco marked this conversation as resolved.
Outdated
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -1127,7 +1127,7 @@ void PFXPetApi::updatePet(const PFXPet &pfx_pet) { | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Jazzco marked this conversation as resolved.
Outdated
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -1263,7 +1263,7 @@ void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const ::test_namespace:: | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetWithFormCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Jazzco marked this conversation as resolved.
Outdated
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
@@ -1399,7 +1399,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const ::test_namespace::Optiona | |||||
|
|
||||||
| connect(_latestWorker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::uploadFileCallback); | ||||||
| connect(this, &PFXPetApi::abortRequestsSignal, _latestWorker, &QObject::deleteLater); | ||||||
| connect(_latestWorker, &QObject::destroyed, [this](){ | ||||||
| connect(_latestWorker, &QObject::destroyed, this, [this](){ | ||||||
|
Jazzco marked this conversation as resolved.
Outdated
|
||||||
| if(findChildren<PFXHttpRequestWorker*>().count() == 0){ | ||||||
| Q_EMIT allPendingRequestsCompleted(); | ||||||
| } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.