diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache index 0150f5b6b9d..2560c8f5bbc 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache @@ -30,10 +30,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - {{classname}}* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + {{classname}}* fromJson(QString jsonString) override; {{#vars}} {{{datatype}}} {{getter}}(); diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache deleted file mode 100644 index 42e8aabeee7..00000000000 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache +++ /dev/null @@ -1,66 +0,0 @@ -{{>licenseInfo}} -{{#models}}{{#model}}/* - * {{classname}}.h - * - * {{description}} - */ - -#ifndef {{classname}}_H_ -#define {{classname}}_H_ - -#include -#include -#include -#include -#include "{{prefix}}Helpers.h" -#include "{{prefix}}Object.h" - -using namespace Tizen::Web::Json; - -{{/model}}{{/models}} -{{#imports}}{{{import}}} -{{/imports}} - -{{#models}} -{{#model}} - -{{#cppNamespaceDeclarations}} -namespace {{this}} { -{{/cppNamespaceDeclarations}} - -class {{classname}}: public {{prefix}}Object { -public: - {{classname}}(); - {{classname}}(String* json); - virtual ~{{classname}}(); - - void init(); - - void cleanup(); - - String asJson (); - - JsonObject* asJsonObject(); - - void fromJsonObject(IJsonValue* json); - - {{classname}}* fromJson(String* obj); - - {{#vars}} - {{datatype}} {{getter}}(); - void {{setter}}({{{datatype}}} {{name}}); - {{/vars}} - -private: - {{#vars}} - {{{datatype}}} {{name}}; - {{/vars}} -}; - -{{#cppNamespaceDeclarations}} -} -{{/cppNamespaceDeclarations}} - -#endif /* {{classname}}_H_ */ -{{/model}} -{{/models}} diff --git a/samples/client/petstore/qt5cpp/client/SWGApiResponse.h b/samples/client/petstore/qt5cpp/client/SWGApiResponse.h index dc94e40a736..10c31e01b71 100644 --- a/samples/client/petstore/qt5cpp/client/SWGApiResponse.h +++ b/samples/client/petstore/qt5cpp/client/SWGApiResponse.h @@ -36,10 +36,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGApiResponse* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGApiResponse* fromJson(QString jsonString) override; qint32 getCode(); void setCode(qint32 code); diff --git a/samples/client/petstore/qt5cpp/client/SWGCategory.h b/samples/client/petstore/qt5cpp/client/SWGCategory.h index 8ccae6b87ce..ef4e309aaa3 100644 --- a/samples/client/petstore/qt5cpp/client/SWGCategory.h +++ b/samples/client/petstore/qt5cpp/client/SWGCategory.h @@ -36,10 +36,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGCategory* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGCategory* fromJson(QString jsonString) override; qint64 getId(); void setId(qint64 id); diff --git a/samples/client/petstore/qt5cpp/client/SWGOrder.h b/samples/client/petstore/qt5cpp/client/SWGOrder.h index 90d9c850bf3..53915797ed3 100644 --- a/samples/client/petstore/qt5cpp/client/SWGOrder.h +++ b/samples/client/petstore/qt5cpp/client/SWGOrder.h @@ -37,10 +37,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGOrder* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGOrder* fromJson(QString jsonString) override; qint64 getId(); void setId(qint64 id); diff --git a/samples/client/petstore/qt5cpp/client/SWGPet.h b/samples/client/petstore/qt5cpp/client/SWGPet.h index 428b260c402..b4e969f99c1 100644 --- a/samples/client/petstore/qt5cpp/client/SWGPet.h +++ b/samples/client/petstore/qt5cpp/client/SWGPet.h @@ -39,10 +39,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGPet* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGPet* fromJson(QString jsonString) override; qint64 getId(); void setId(qint64 id); diff --git a/samples/client/petstore/qt5cpp/client/SWGTag.h b/samples/client/petstore/qt5cpp/client/SWGTag.h index dd7b4101563..36425fab994 100644 --- a/samples/client/petstore/qt5cpp/client/SWGTag.h +++ b/samples/client/petstore/qt5cpp/client/SWGTag.h @@ -36,10 +36,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGTag* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGTag* fromJson(QString jsonString) override; qint64 getId(); void setId(qint64 id); diff --git a/samples/client/petstore/qt5cpp/client/SWGUser.h b/samples/client/petstore/qt5cpp/client/SWGUser.h index 5e3e7e54a4b..35f880e44ae 100644 --- a/samples/client/petstore/qt5cpp/client/SWGUser.h +++ b/samples/client/petstore/qt5cpp/client/SWGUser.h @@ -36,10 +36,10 @@ public: void init(); void cleanup(); - QString asJson (); - QJsonObject asJsonObject(); - void fromJsonObject(QJsonObject json); - SWGUser* fromJson(QString jsonString); + QString asJson () override; + QJsonObject asJsonObject() override; + void fromJsonObject(QJsonObject json) override; + SWGUser* fromJson(QString jsonString) override; qint64 getId(); void setId(qint64 id);