diff --git a/bin/configs/cpp-qt-client.yaml b/bin/configs/cpp-qt-client.yaml index c10d98ae60e5..4bcf97e6869e 100644 --- a/bin/configs/cpp-qt-client.yaml +++ b/bin/configs/cpp-qt-client.yaml @@ -6,3 +6,4 @@ additionalProperties: packageName: CppQtPetstoreClient cppNamespace: test_namespace modelNamePrefix: PFX + addDownloadProgress: true diff --git a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp index 5084e4f4deaf..23d73cd75acf 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXPetApi.cpp @@ -240,7 +240,7 @@ void PFXPetApi::addPet(const PFXPet &pfx_pet) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -349,7 +349,7 @@ void PFXPetApi::allPets() { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -448,7 +448,7 @@ void PFXPetApi::deletePet(const qint64 &pet_id, const ::test_namespace::Optional input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -643,7 +643,7 @@ void PFXPetApi::findPetsByStatus(const QList &status) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -848,7 +848,7 @@ void PFXPetApi::findPetsByTags(const QList &tags) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -985,7 +985,7 @@ void PFXPetApi::getPetById(const qint64 &pet_id) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -1060,7 +1060,7 @@ void PFXPetApi::updatePet(const PFXPet &pfx_pet) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -1191,7 +1191,7 @@ void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const ::test_namespace:: input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -1322,7 +1322,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const ::test_namespace::Optiona input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { diff --git a/samples/client/petstore/cpp-qt/client/PFXPetApi.h b/samples/client/petstore/cpp-qt/client/PFXPetApi.h index 42d40f1735fd..e2688c5b9d30 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPetApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXPetApi.h @@ -152,6 +152,15 @@ class PFXPetApi : public QObject { void updatePetWithFormSignal(); void uploadFileSignal(PFXApiResponse summary); + void addPetProgress(qint64 bytesReceived, qint64 bytesTotal); + void allPetsProgress(qint64 bytesReceived, qint64 bytesTotal); + void deletePetProgress(qint64 bytesReceived, qint64 bytesTotal); + void findPetsByStatusProgress(qint64 bytesReceived, qint64 bytesTotal); + void findPetsByTagsProgress(qint64 bytesReceived, qint64 bytesTotal); + void getPetByIdProgress(qint64 bytesReceived, qint64 bytesTotal); + void updatePetProgress(qint64 bytesReceived, qint64 bytesTotal); + void updatePetWithFormProgress(qint64 bytesReceived, qint64 bytesTotal); + void uploadFileProgress(qint64 bytesReceived, qint64 bytesTotal); void addPetSignalFull(PFXHttpRequestWorker *worker); void allPetsSignalFull(PFXHttpRequestWorker *worker, QSet summary); diff --git a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp index 5836fc875527..5bf3ba3b3eb7 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp @@ -225,7 +225,7 @@ void PFXPrimitivesApi::primitivesIntegerPost(const ::test_namespace::OptionalPar input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -298,7 +298,7 @@ void PFXPrimitivesApi::primitivesNumberPut(const ::test_namespace::OptionalParam input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { diff --git a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.h b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.h index 64de9e41430b..722ef1746b55 100644 --- a/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.h @@ -96,6 +96,8 @@ class PFXPrimitivesApi : public QObject { void primitivesIntegerPostSignal(); void primitivesNumberPutSignal(); + void primitivesIntegerPostProgress(qint64 bytesReceived, qint64 bytesTotal); + void primitivesNumberPutProgress(qint64 bytesReceived, qint64 bytesTotal); void primitivesIntegerPostSignalFull(PFXHttpRequestWorker *worker); void primitivesNumberPutSignalFull(PFXHttpRequestWorker *worker); diff --git a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp index b8f9698839b0..54825bab3679 100644 --- a/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp @@ -239,7 +239,7 @@ void PFXStoreApi::deleteOrder(const QString &order_id) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -312,7 +312,7 @@ void PFXStoreApi::getInventory() { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -405,7 +405,7 @@ void PFXStoreApi::getOrderById(const qint64 &order_id) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -480,7 +480,7 @@ void PFXStoreApi::placeOrder(const PFXOrder &pfx_order) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { diff --git a/samples/client/petstore/cpp-qt/client/PFXStoreApi.h b/samples/client/petstore/cpp-qt/client/PFXStoreApi.h index 0966e3f00d6c..e5ff6fd32b7a 100644 --- a/samples/client/petstore/cpp-qt/client/PFXStoreApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXStoreApi.h @@ -110,6 +110,10 @@ class PFXStoreApi : public QObject { void getOrderByIdSignal(PFXOrder summary); void placeOrderSignal(PFXOrder summary); + void deleteOrderProgress(qint64 bytesReceived, qint64 bytesTotal); + void getInventoryProgress(qint64 bytesReceived, qint64 bytesTotal); + void getOrderByIdProgress(qint64 bytesReceived, qint64 bytesTotal); + void placeOrderProgress(qint64 bytesReceived, qint64 bytesTotal); void deleteOrderSignalFull(PFXHttpRequestWorker *worker); void getInventorySignalFull(PFXHttpRequestWorker *worker, QMap summary); diff --git a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp index 560da635bf00..1dde54421429 100644 --- a/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXUserApi.cpp @@ -238,7 +238,7 @@ void PFXUserApi::createUser(const PFXUser &pfx_user) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -311,7 +311,7 @@ void PFXUserApi::createUsersWithArrayInput(const QList &pfx_user) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -384,7 +384,7 @@ void PFXUserApi::createUsersWithListInput(const QList &pfx_user) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -467,7 +467,7 @@ void PFXUserApi::deleteUser(const QString &username) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -550,7 +550,7 @@ void PFXUserApi::getUserByName(const QString &username) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -651,7 +651,7 @@ void PFXUserApi::loginUser(const QString &username, const QString &password) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -722,7 +722,7 @@ void PFXUserApi::logoutUser() { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { @@ -810,7 +810,7 @@ void PFXUserApi::updateUser(const QString &username, const PFXUser &pfx_user) { input.headers.insert(keyValueIt->first, keyValueIt->second); } - + 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]() { diff --git a/samples/client/petstore/cpp-qt/client/PFXUserApi.h b/samples/client/petstore/cpp-qt/client/PFXUserApi.h index 29bfe7159715..8356df7c53e0 100644 --- a/samples/client/petstore/cpp-qt/client/PFXUserApi.h +++ b/samples/client/petstore/cpp-qt/client/PFXUserApi.h @@ -139,6 +139,14 @@ class PFXUserApi : public QObject { void logoutUserSignal(); void updateUserSignal(); + void createUserProgress(qint64 bytesReceived, qint64 bytesTotal); + void createUsersWithArrayInputProgress(qint64 bytesReceived, qint64 bytesTotal); + void createUsersWithListInputProgress(qint64 bytesReceived, qint64 bytesTotal); + void deleteUserProgress(qint64 bytesReceived, qint64 bytesTotal); + void getUserByNameProgress(qint64 bytesReceived, qint64 bytesTotal); + void loginUserProgress(qint64 bytesReceived, qint64 bytesTotal); + void logoutUserProgress(qint64 bytesReceived, qint64 bytesTotal); + void updateUserProgress(qint64 bytesReceived, qint64 bytesTotal); void createUserSignalFull(PFXHttpRequestWorker *worker); void createUsersWithArrayInputSignalFull(PFXHttpRequestWorker *worker);