diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-04-14 14:08:44 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-04-14 14:08:44 +0900 |
commit | 07d2b179bb08c4b941eca3f20b9ef31740ad95bd (patch) | |
tree | 0c418a0bef186b8ef01f60e8e41057ddb5eeaad1 /lib/jobs | |
parent | 341bea5fc7df0143fa118072d2dbb8158cc6eb23 (diff) | |
download | libquotient-07d2b179bb08c4b941eca3f20b9ef31740ad95bd.tar.gz libquotient-07d2b179bb08c4b941eca3f20b9ef31740ad95bd.zip |
Mustache: {{#producesNonJson?}} -> {{#producesNotJson?}}
According to the most recent changes in GTAD.
Diffstat (limited to 'lib/jobs')
-rw-r--r-- | lib/jobs/{{base}}.cpp.mustache | 14 | ||||
-rw-r--r-- | lib/jobs/{{base}}.h.mustache | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/jobs/{{base}}.cpp.mustache b/lib/jobs/{{base}}.cpp.mustache index b8532c51..5e94dcf0 100644 --- a/lib/jobs/{{base}}.cpp.mustache +++ b/lib/jobs/{{base}}.cpp.mustache @@ -3,8 +3,8 @@ {{^allModels}} #include "converters.h" {{/allModels}}{{#operations}} -{{#producesNotJson?}}#include <QtNetwork/QNetworkReply> -{{/producesNotJson?}}#include <QtCore/QStringBuilder> +{{#producesNonJson?}}#include <QtNetwork/QNetworkReply> +{{/producesNonJson?}}#include <QtCore/QStringBuilder> {{/operations}} using namespace QMatrixClient; {{#models.model}}{{^trivial?}} @@ -88,8 +88,8 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}}, {{ {{^required?}}{{#string?}} if (!{{paramName}}.isEmpty()) {{/string?}}{{/required?}} _data.insert("{{baseName}}", toJson({{paramName}}));{{/bodyParams}} setRequestData(_data);{{/inlineBody}} -{{/bodyParams?}}{{#producesNotJson?}} setExpectedContentTypes({ {{#produces}}"{{_}}"{{#@join}}, {{/@join}}{{/produces}} }); -{{/producesNotJson?}}}{{!<- mind the actual brace}} +{{/bodyParams?}}{{#producesNonJson?}} setExpectedContentTypes({ {{#produces}}"{{_}}"{{#@join}}, {{/@join}}{{/produces}} }); +{{/producesNonJson?}}}{{!<- mind the actual brace}} {{# responses}}{{#normalResponse?}}{{#allProperties?}} {{camelCaseOperationId}}Job::~{{camelCaseOperationId}}Job() = default; {{# allProperties}} @@ -97,13 +97,13 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}}, {{ { return d->{{paramName}}; } -{{/ allProperties}}{{#producesNotJson?}} +{{/ allProperties}}{{#producesNonJson?}} BaseJob::Status {{camelCaseOperationId}}Job::parseReply(QNetworkReply* reply) { {{#headers}}d->{{paramName}} = reply->rawHeader("{{baseName}}"); {{! We don't check for required headers yet }} {{/headers}}{{#properties}}d->{{paramName}} = reply;{{/properties}} return Success; -}{{/ producesNotJson?}}{{^producesNotJson?}} +}{{/ producesNonJson?}}{{^producesNonJson?}} BaseJob::Status {{camelCaseOperationId}}Job::parseJson(const QJsonDocument& data) { auto json = data.object(); @@ -112,5 +112,5 @@ BaseJob::Status {{camelCaseOperationId}}Job::parseJson(const QJsonDocument& data "The key '{{baseName}}' not found in the response" }; {{/required?}}d->{{paramName}} = fromJson<{{dataType.name}}>(json.value("{{baseName}}")); {{/ properties}}return Success; -}{{/ producesNotJson?}} +}{{/ producesNonJson?}} {{/allProperties?}}{{/normalResponse?}}{{/responses}}{{/operation}}{{/operations}} diff --git a/lib/jobs/{{base}}.h.mustache b/lib/jobs/{{base}}.h.mustache index 63aa53e7..12633604 100644 --- a/lib/jobs/{{base}}.h.mustache +++ b/lib/jobs/{{base}}.h.mustache @@ -57,7 +57,7 @@ namespace QMatrixClient {{>maybeCrefType}} {{paramName}}() const;{{/allProperties}} protected: - Status {{#producesNotJson?}}parseReply(QNetworkReply* reply){{/producesNotJson?}}{{^producesNotJson?}}parseJson(const QJsonDocument& data){{/producesNotJson?}} override; + Status {{#producesNonJson?}}parseReply(QNetworkReply* reply){{/producesNonJson?}}{{^producesNonJson?}}parseJson(const QJsonDocument& data){{/producesNonJson?}} override; private: class Private; |