diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache index e64476a579ab..30ab43c3bac1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache @@ -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(); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache index 6e4bb4743fe1..96f4b2778cf6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache @@ -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(); } diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp index 0e05affef6b4..fc78f322f6f1 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp @@ -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(); diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPetApi.cpp index 23d73cd75acf..88e40e79d1c2 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPetApi.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPetApi.cpp @@ -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().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().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().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().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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } @@ -646,7 +646,7 @@ void PFXPetApi::findPetsByStatus(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -669,7 +669,7 @@ void PFXPetApi::findPetsByStatus(const QList &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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } @@ -851,7 +851,7 @@ void PFXPetApi::findPetsByTags(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -874,7 +874,7 @@ void PFXPetApi::findPetsByTags(const QList &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().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().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().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().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().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().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().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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPrimitivesApi.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPrimitivesApi.cpp index 5bf3ba3b3eb7..2171cb0c5004 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPrimitivesApi.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXPrimitivesApi.cpp @@ -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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXStoreApi.cpp index 54825bab3679..68711efe12e1 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXStoreApi.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXStoreApi.cpp @@ -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().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().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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXUserApi.cpp index 1dde54421429..1e7b6b470cc9 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXUserApi.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXUserApi.cpp @@ -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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -314,7 +314,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -387,7 +387,7 @@ void PFXUserApi::createUsersWithListInput(const QList &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().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().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().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().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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp index 0e05affef6b4..fc78f322f6f1 100644 --- a/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp @@ -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(); diff --git a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp index 5084e4f4deaf..ab5bc83996ab 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp @@ -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().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().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().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().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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } @@ -646,7 +646,7 @@ void PFXPetApi::findPetsByStatus(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -669,7 +669,7 @@ void PFXPetApi::findPetsByStatus(const QList &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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } @@ -851,7 +851,7 @@ void PFXPetApi::findPetsByTags(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -874,7 +874,7 @@ void PFXPetApi::findPetsByTags(const QList &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().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().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().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().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().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().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().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().count() == 0){ Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp index 5836fc875527..789531ab8b6a 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp @@ -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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp index b8f9698839b0..5067733ee613 100644 --- a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp @@ -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().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().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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } diff --git a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp index 560da635bf00..042c9aab9a3f 100644 --- a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp @@ -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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -314,7 +314,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList &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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); } @@ -387,7 +387,7 @@ void PFXUserApi::createUsersWithListInput(const QList &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().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().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().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().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().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().count() == 0) { Q_EMIT allPendingRequestsCompleted(); }