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 0beb74c724..52891ab595 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache @@ -185,9 +185,9 @@ void QJsonObject obj = doc.object(); foreach(QString key, obj.keys()) { - qint32* val; + {{returnBaseType}} val; setValue(&val, obj[key], "{{returnBaseType}}", QString()); - output->insert(key, *val); + output->insert(key, val); } {{/isMapContainer}} {{^isMapContainer}} diff --git a/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp b/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp index e6ea199013..bdf745b34f 100644 --- a/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp @@ -126,9 +126,9 @@ SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) { QJsonObject obj = doc.object(); foreach(QString key, obj.keys()) { - qint32* val; + qint32 val; setValue(&val, obj[key], "qint32", QString()); - output->insert(key, *val); + output->insert(key, val); } worker->deleteLater();