forked from loafle/openapi-generator-original
Update HttpRequest.cpp.mustache - use stable 4-parameter connect (#18893)
* Update HttpRequest.cpp.mustache Use stable 4-parameter connect * add generated files * Revert "add generated files" This reverts commit 1d4e78aa0d42208b576354276c274000c29863f9. * changed from 3- to 4-parameter connect for api-body for stable connection (see warning [clazy-connect-3arg-lambda]) * ran step 3 from Linux * fixed missing braces and additional 3par issues * add step 3 generated file * activate trace for more info about link issue * Update .github/workflows/samples-cpp-qt-client.yaml Co-authored-by: Martin Delille <martin@delille.org> * Update .github/workflows/samples-cpp-qt-client.yaml Co-authored-by: Martin Delille <martin@delille.org> * Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp Co-authored-by: Martin Delille <martin@delille.org> * Update modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache Co-authored-by: Martin Delille <martin@delille.org> * Update modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache Co-authored-by: Martin Delille <martin@delille.org> * Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache Co-authored-by: Martin Delille <martin@delille.org> * Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache Co-authored-by: Martin Delille <martin@delille.org> * Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache Co-authored-by: Martin Delille <martin@delille.org> * Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp Co-authored-by: Martin Delille <martin@delille.org> * Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp Co-authored-by: Martin Delille <martin@delille.org> * Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp Co-authored-by: Martin Delille <martin@delille.org> * Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp Co-authored-by: Martin Delille <martin@delille.org> * rebuild examples * Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache Co-authored-by: Martin Delille <martin@delille.org> * removed braces and updated examples * rebuild samples * remove false generated changes --------- Co-authored-by: Martin Delille <martin@delille.org>
This commit is contained in:
parent
4ddfb6fc41
commit
1214ad7492
@ -353,12 +353,12 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) {
|
||||
if (reply != nullptr) {
|
||||
reply->setParent(this);
|
||||
connect(reply, &QNetworkReply::downloadProgress, this, &{{prefix}}HttpRequestWorker::downloadProgress);
|
||||
connect(reply, &QNetworkReply::finished, [this, reply] {
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
||||
on_reply_finished(reply);
|
||||
});
|
||||
}
|
||||
if (timeOutTimer.interval() > 0) {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, [this, reply] {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, this, [this, reply] {
|
||||
on_reply_timeout(reply);
|
||||
});
|
||||
timeOutTimer.start();
|
||||
|
@ -664,7 +664,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
|
||||
connect(worker, &{{prefix}}HttpRequestWorker::downloadProgress, this, &{{classname}}::{{nickname}}Progress);{{/addDownloadProgress}}
|
||||
connect(worker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback);
|
||||
connect(this, &{{classname}}::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<{{prefix}}HttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -690,7 +690,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
|
||||
|
||||
connect(_latestWorker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback);
|
||||
connect(this, &{{classname}}::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
|
||||
connect(_latestWorker, &QObject::destroyed, [this](){
|
||||
connect(_latestWorker, &QObject::destroyed, this, [this] {
|
||||
if(findChildren<{{prefix}}HttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -720,7 +720,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
|
||||
|
||||
connect(_latestWorker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback);
|
||||
connect(this, &{{classname}}::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
|
||||
connect(_latestWorker, &QObject::destroyed, [this](){
|
||||
connect(_latestWorker, &QObject::destroyed, this, [this] {
|
||||
if(findChildren<{{prefix}}HttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -750,7 +750,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
|
||||
|
||||
connect(_latestWorker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback);
|
||||
connect(this, &{{classname}}::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
|
||||
connect(_latestWorker, &QObject::destroyed, [this](){
|
||||
connect(_latestWorker, &QObject::destroyed, this, [this] {
|
||||
if(findChildren<{{prefix}}HttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -780,7 +780,7 @@ void {{classname}}::{{nickname}}({{#allParams}}{{#required}}const {{{dataType}}}
|
||||
|
||||
connect(_latestWorker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback);
|
||||
connect(this, &{{classname}}::abortRequestsSignal, _latestWorker, &QObject::deleteLater);
|
||||
connect(_latestWorker, &QObject::destroyed, [this](){
|
||||
connect(_latestWorker, &QObject::destroyed, this, [this] {
|
||||
if(findChildren<{{prefix}}HttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -360,12 +360,12 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) {
|
||||
if (reply != nullptr) {
|
||||
reply->setParent(this);
|
||||
connect(reply, &QNetworkReply::downloadProgress, this, &PFXHttpRequestWorker::downloadProgress);
|
||||
connect(reply, &QNetworkReply::finished, [this, reply] {
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
||||
on_reply_finished(reply);
|
||||
});
|
||||
}
|
||||
if (timeOutTimer.interval() > 0) {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, [this, reply] {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, this, [this, reply] {
|
||||
on_reply_timeout(reply);
|
||||
});
|
||||
timeOutTimer.start();
|
||||
|
@ -243,7 +243,7 @@ void PFXPetApi::addPet(const PFXPet &pfx_pet) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::addPetProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::addPetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -266,7 +266,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -352,7 +352,7 @@ void PFXPetApi::allPets() {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::allPetsProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::allPetsCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -451,7 +451,7 @@ void PFXPetApi::deletePet(const qint64 &pet_id, const ::test_namespace::Optional
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::deletePetProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::deletePetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -474,7 +474,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -646,7 +646,7 @@ void PFXPetApi::findPetsByStatus(const QList<QString> &status) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::findPetsByStatusProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByStatusCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -669,7 +669,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -851,7 +851,7 @@ void PFXPetApi::findPetsByTags(const QList<QString> &tags) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::findPetsByTagsProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByTagsCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -874,7 +874,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -988,7 +988,7 @@ void PFXPetApi::getPetById(const qint64 &pet_id) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::getPetByIdProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::getPetByIdCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ void PFXPetApi::updatePet(const PFXPet &pfx_pet) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::updatePetProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1086,7 +1086,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1194,7 +1194,7 @@ void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const ::test_namespace::
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::updatePetWithFormProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetWithFormCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1217,7 +1217,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1325,7 +1325,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const ::test_namespace::Optiona
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPetApi::uploadFileProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::uploadFileCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1348,7 +1348,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ void PFXPrimitivesApi::primitivesIntegerPost(const ::test_namespace::OptionalPar
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPrimitivesApi::primitivesIntegerPostProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPrimitivesApi::primitivesIntegerPostCallback);
|
||||
connect(this, &PFXPrimitivesApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -301,7 +301,7 @@ void PFXPrimitivesApi::primitivesNumberPut(const ::test_namespace::OptionalParam
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXPrimitivesApi::primitivesNumberPutProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPrimitivesApi::primitivesNumberPutCallback);
|
||||
connect(this, &PFXPrimitivesApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ void PFXStoreApi::deleteOrder(const QString &order_id) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXStoreApi::deleteOrderProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::deleteOrderCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -315,7 +315,7 @@ void PFXStoreApi::getInventory() {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXStoreApi::getInventoryProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::getInventoryCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -408,7 +408,7 @@ void PFXStoreApi::getOrderById(const qint64 &order_id) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXStoreApi::getOrderByIdProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::getOrderByIdCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -483,7 +483,7 @@ void PFXStoreApi::placeOrder(const PFXOrder &pfx_order) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXStoreApi::placeOrderProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::placeOrderCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ void PFXUserApi::createUser(const PFXUser &pfx_user) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::createUserProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -314,7 +314,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList<PFXUser> &pfx_user) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::createUsersWithArrayInputProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithArrayInputCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -387,7 +387,7 @@ void PFXUserApi::createUsersWithListInput(const QList<PFXUser> &pfx_user) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::createUsersWithListInputProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithListInputCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -470,7 +470,7 @@ void PFXUserApi::deleteUser(const QString &username) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::deleteUserProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::deleteUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -553,7 +553,7 @@ void PFXUserApi::getUserByName(const QString &username) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::getUserByNameProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::getUserByNameCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -654,7 +654,7 @@ void PFXUserApi::loginUser(const QString &username, const QString &password) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::loginUserProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::loginUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -725,7 +725,7 @@ void PFXUserApi::logoutUser() {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::logoutUserProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::logoutUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -813,7 +813,7 @@ void PFXUserApi::updateUser(const QString &username, const PFXUser &pfx_user) {
|
||||
connect(worker, &PFXHttpRequestWorker::downloadProgress, this, &PFXUserApi::updateUserProgress);
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::updateUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -360,12 +360,12 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) {
|
||||
if (reply != nullptr) {
|
||||
reply->setParent(this);
|
||||
connect(reply, &QNetworkReply::downloadProgress, this, &PFXHttpRequestWorker::downloadProgress);
|
||||
connect(reply, &QNetworkReply::finished, [this, reply] {
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply] {
|
||||
on_reply_finished(reply);
|
||||
});
|
||||
}
|
||||
if (timeOutTimer.interval() > 0) {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, [this, reply] {
|
||||
QObject::connect(&timeOutTimer, &QTimer::timeout, this, [this, reply] {
|
||||
on_reply_timeout(reply);
|
||||
});
|
||||
timeOutTimer.start();
|
||||
|
@ -243,7 +243,7 @@ void PFXPetApi::addPet(const PFXPet &pfx_pet) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::addPetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -266,7 +266,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -352,7 +352,7 @@ void PFXPetApi::allPets() {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::allPetsCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -451,7 +451,7 @@ void PFXPetApi::deletePet(const qint64 &pet_id, const ::test_namespace::Optional
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::deletePetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -474,7 +474,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -646,7 +646,7 @@ void PFXPetApi::findPetsByStatus(const QList<QString> &status) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByStatusCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -669,7 +669,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -851,7 +851,7 @@ void PFXPetApi::findPetsByTags(const QList<QString> &tags) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::findPetsByTagsCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -874,7 +874,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -988,7 +988,7 @@ void PFXPetApi::getPetById(const qint64 &pet_id) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::getPetByIdCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ void PFXPetApi::updatePet(const PFXPet &pfx_pet) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1086,7 +1086,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1194,7 +1194,7 @@ void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const ::test_namespace::
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetWithFormCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1217,7 +1217,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1325,7 +1325,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const ::test_namespace::Optiona
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::uploadFileCallback);
|
||||
connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -1348,7 +1348,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] {
|
||||
if(findChildren<PFXHttpRequestWorker*>().count() == 0){
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ void PFXPrimitivesApi::primitivesIntegerPost(const ::test_namespace::OptionalPar
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPrimitivesApi::primitivesIntegerPostCallback);
|
||||
connect(this, &PFXPrimitivesApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -301,7 +301,7 @@ void PFXPrimitivesApi::primitivesNumberPut(const ::test_namespace::OptionalParam
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPrimitivesApi::primitivesNumberPutCallback);
|
||||
connect(this, &PFXPrimitivesApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ void PFXStoreApi::deleteOrder(const QString &order_id) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::deleteOrderCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -315,7 +315,7 @@ void PFXStoreApi::getInventory() {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::getInventoryCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -408,7 +408,7 @@ void PFXStoreApi::getOrderById(const qint64 &order_id) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::getOrderByIdCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -483,7 +483,7 @@ void PFXStoreApi::placeOrder(const PFXOrder &pfx_order) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::placeOrderCallback);
|
||||
connect(this, &PFXStoreApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ void PFXUserApi::createUser(const PFXUser &pfx_user) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -314,7 +314,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList<PFXUser> &pfx_user) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithArrayInputCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -387,7 +387,7 @@ void PFXUserApi::createUsersWithListInput(const QList<PFXUser> &pfx_user) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithListInputCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -470,7 +470,7 @@ void PFXUserApi::deleteUser(const QString &username) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::deleteUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -553,7 +553,7 @@ void PFXUserApi::getUserByName(const QString &username) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::getUserByNameCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -654,7 +654,7 @@ void PFXUserApi::loginUser(const QString &username, const QString &password) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::loginUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -725,7 +725,7 @@ void PFXUserApi::logoutUser() {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::logoutUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
@ -813,7 +813,7 @@ void PFXUserApi::updateUser(const QString &username, const PFXUser &pfx_user) {
|
||||
|
||||
connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::updateUserCallback);
|
||||
connect(this, &PFXUserApi::abortRequestsSignal, worker, &QObject::deleteLater);
|
||||
connect(worker, &QObject::destroyed, this, [this]() {
|
||||
connect(worker, &QObject::destroyed, this, [this] {
|
||||
if (findChildren<PFXHttpRequestWorker*>().count() == 0) {
|
||||
Q_EMIT allPendingRequestsCompleted();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user