From 8519480f2c443c0addabfbdc9b47671d00ceb0c4 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 12 May 2015 06:50:45 -0400 Subject: [PATCH] removed some cruft --- .../main/resources/qt5cpp/api-body.mustache | 10 +---- .../petstore/qt5cpp/client/SWGPetApi.cpp | 41 ------------------- .../petstore/qt5cpp/client/SWGStoreApi.cpp | 19 --------- .../petstore/qt5cpp/client/SWGUserApi.cpp | 34 --------------- 4 files changed, 1 insertion(+), 103 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache index a7a1d2646dd..9103cb5e16f 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache @@ -33,8 +33,6 @@ void .append(QUrl::toPercentEncoding(stringValue({{paramName}}))); {{/queryParams}} - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "{{httpMethod}}"); @@ -65,10 +63,7 @@ void msg = "Error: " + worker->error_str; } - // return type: {{{returnType}}} - - {{#returnType}} - {{#isListContainer}} + {{#returnType}}{{#isListContainer}} {{{returnType}}} output = {{{defaultResponse}}}; QString json(worker->response); QByteArray array (json.toStdString().c_str()); @@ -82,9 +77,6 @@ void o->fromJsonObject(*ptr); output->append(o); } - - - // void toJsonArray(QList* value, QJsonArray* output, QString innerName, QString innerType); {{/isListContainer}} {{^isListContainer}}{{#returnTypeIsPrimitive}} diff --git a/samples/client/petstore/qt5cpp/client/SWGPetApi.cpp b/samples/client/petstore/qt5cpp/client/SWGPetApi.cpp index 312791e4b0f..4405b0e4d24 100644 --- a/samples/client/petstore/qt5cpp/client/SWGPetApi.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGPetApi.cpp @@ -23,8 +23,6 @@ SWGPetApi::updatePet(SWGPet body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "PUT"); @@ -53,8 +51,6 @@ SWGPetApi::updatePetCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -71,8 +67,6 @@ SWGPetApi::addPet(SWGPet body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -101,8 +95,6 @@ SWGPetApi::addPetCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -124,8 +116,6 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) { .append(QUrl::toPercentEncoding(stringValue(status))); - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -151,9 +141,6 @@ SWGPetApi::findPetsByStatusCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: QList* - - QList* output = new QList(); QString json(worker->response); @@ -168,9 +155,6 @@ SWGPetApi::findPetsByStatusCallback(HttpRequestWorker * worker) { o->fromJsonObject(*ptr); output->append(o); } - - - // void toJsonArray(QList* value, QJsonArray* output, QString innerName, QString innerType); @@ -194,8 +178,6 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) { .append(QUrl::toPercentEncoding(stringValue(tags))); - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -221,9 +203,6 @@ SWGPetApi::findPetsByTagsCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: QList* - - QList* output = new QList(); QString json(worker->response); @@ -238,9 +217,6 @@ SWGPetApi::findPetsByTagsCallback(HttpRequestWorker * worker) { o->fromJsonObject(*ptr); output->append(o); } - - - // void toJsonArray(QList* value, QJsonArray* output, QString innerName, QString innerType); @@ -262,8 +238,6 @@ SWGPetApi::getPetById(qint64 petId) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -289,9 +263,6 @@ SWGPetApi::getPetByIdCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: SWGPet* - - @@ -318,8 +289,6 @@ SWGPetApi::updatePetWithForm(QString* petId, QString* name, QString* status) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -345,8 +314,6 @@ SWGPetApi::updatePetWithFormCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -366,8 +333,6 @@ SWGPetApi::deletePet(QString* api_key, qint64 petId) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "DELETE"); @@ -395,8 +360,6 @@ SWGPetApi::deletePetCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -416,8 +379,6 @@ SWGPetApi::uploadFile(qint64 petId, QString* additionalMetadata, SWGFile* file) - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -443,8 +404,6 @@ SWGPetApi::uploadFileCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); diff --git a/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp b/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp index a973c7c99fd..8602eb009fd 100644 --- a/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp @@ -23,8 +23,6 @@ SWGStoreApi::getInventory() { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -50,9 +48,6 @@ SWGStoreApi::getInventoryCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: QMap* - - @@ -76,8 +71,6 @@ SWGStoreApi::placeOrder(SWGOrder body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -106,9 +99,6 @@ SWGStoreApi::placeOrderCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: SWGOrder* - - @@ -135,8 +125,6 @@ SWGStoreApi::getOrderById(QString* orderId) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -162,9 +150,6 @@ SWGStoreApi::getOrderByIdCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: SWGOrder* - - @@ -191,8 +176,6 @@ SWGStoreApi::deleteOrder(QString* orderId) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "DELETE"); @@ -218,8 +201,6 @@ SWGStoreApi::deleteOrderCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); diff --git a/samples/client/petstore/qt5cpp/client/SWGUserApi.cpp b/samples/client/petstore/qt5cpp/client/SWGUserApi.cpp index 21bba60e7d1..9d17e9067e3 100644 --- a/samples/client/petstore/qt5cpp/client/SWGUserApi.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGUserApi.cpp @@ -23,8 +23,6 @@ SWGUserApi::createUser(SWGUser body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -53,8 +51,6 @@ SWGUserApi::createUserCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -71,8 +67,6 @@ SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>* body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -101,8 +95,6 @@ SWGUserApi::createUsersWithArrayInputCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -119,8 +111,6 @@ SWGUserApi::createUsersWithListInput(QList<SWGUser*>* body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "POST"); @@ -149,8 +139,6 @@ SWGUserApi::createUsersWithListInputCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -177,8 +165,6 @@ SWGUserApi::loginUser(QString* username, QString* password) { .append(QUrl::toPercentEncoding(stringValue(password))); - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -204,9 +190,6 @@ SWGUserApi::loginUserCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: QString* - - @@ -230,8 +213,6 @@ SWGUserApi::logoutUser() { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -257,8 +238,6 @@ SWGUserApi::logoutUserCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -278,8 +257,6 @@ SWGUserApi::getUserByName(QString* username) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "GET"); @@ -305,9 +282,6 @@ SWGUserApi::getUserByNameCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: SWGUser* - - @@ -334,8 +308,6 @@ SWGUserApi::updateUser(QString* username, SWGUser body) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "PUT"); @@ -364,8 +336,6 @@ SWGUserApi::updateUserCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater(); @@ -385,8 +355,6 @@ SWGUserApi::deleteUser(QString* username) { - // qDebug() << fullPath; - HttpRequestWorker *worker = new HttpRequestWorker(); HttpRequestInput input(fullPath, "DELETE"); @@ -412,8 +380,6 @@ SWGUserApi::deleteUserCallback(HttpRequestWorker * worker) { msg = "Error: " + worker->error_str; } - // return type: - worker->deleteLater();