aboutsummaryrefslogtreecommitdiff
path: root/gtad/operation.cpp.mustache
diff options
context:
space:
mode:
Diffstat (limited to 'gtad/operation.cpp.mustache')
-rw-r--r--gtad/operation.cpp.mustache9
1 files changed, 3 insertions, 6 deletions
diff --git a/gtad/operation.cpp.mustache b/gtad/operation.cpp.mustache
index 1d0ae476..3d26ec73 100644
--- a/gtad/operation.cpp.mustache
+++ b/gtad/operation.cpp.mustache
@@ -1,12 +1,9 @@
{{!
SPDX-FileCopyrightText: 2020 Kitsune Ral <Kitsune-Ral@users.sf.net>
SPDX-License-Identifier: LGPL-2.1-or-later
-}}
-{{>preamble}}
+}}{{>preamble}}
#include "{{filenameBase}}.h"
-#include <QtCore/QStringBuilder>
-
using namespace Quotient;
{{#operations}}{{#operation}}
{{#queryParams?}}
@@ -14,7 +11,7 @@ using namespace Quotient;
auto queryTo{{camelCaseOperationId}}(
{{#queryParams}}{{>joinedParamDef}}{{/queryParams}})
{
- BaseJob::Query _q;{{#queryParams}}
+ QUrlQuery _q;{{#queryParams}}
addParam<{{^required?}}IfNotEmpty{{/required?}}>(_q,
QStringLiteral("{{baseName}}"), {{paramName}});{{/queryParams}}
return _q;
@@ -37,7 +34,7 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}},
{ {{#headerParams}}
setRequestHeader("{{baseName}}", {{paramName}}.toLatin1());
{{/headerParams}}{{#inlineBody}}{{^propertyMap}}{{^bodyParams?}}
- setRequestData(Data({{#consumesNonJson?}}{{nameCamelCase}}{{/consumesNonJson?
+ setRequestData(RequestData({{#consumesNonJson?}}{{nameCamelCase}}{{/consumesNonJson?
}}{{^consumesNonJson?}}toJson({{nameCamelCase}}){{/consumesNonJson?}}));
{{/bodyParams?}}{{/propertyMap}}{{/inlineBody
}}{{^consumesNonJson?}}{{#bodyParams?}}