From 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 17 Apr 2020 07:42:13 +0200 Subject: Regenerate API files using new GTAD and refreshed templates No functional changes. --- lib/csapi/pusher.cpp | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'lib/csapi/pusher.cpp') diff --git a/lib/csapi/pusher.cpp b/lib/csapi/pusher.cpp index 90877a95..ad51b901 100644 --- a/lib/csapi/pusher.cpp +++ b/lib/csapi/pusher.cpp @@ -13,12 +13,10 @@ using namespace Quotient; static const auto basePath = QStringLiteral("/_matrix/client/r0"); // Converters -namespace Quotient -{ +namespace Quotient { template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void fillFrom(const QJsonObject& jo, GetPushersJob::PusherData& result) { @@ -28,8 +26,7 @@ struct JsonObjectConverter }; template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void fillFrom(const QJsonObject& jo, GetPushersJob::Pusher& result) { fromJson(jo.value("pushkey"_ls), result.pushkey); @@ -45,8 +42,7 @@ struct JsonObjectConverter } // namespace Quotient -class GetPushersJob::Private -{ +class GetPushersJob::Private { public: QVector pushers; }; @@ -56,10 +52,9 @@ QUrl GetPushersJob::makeRequestUrl(QUrl baseUrl) return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/pushers"); } -static const auto GetPushersJobName = QStringLiteral("GetPushersJob"); - GetPushersJob::GetPushersJob() - : BaseJob(HttpVerb::Get, GetPushersJobName, basePath % "/pushers") + : BaseJob(HttpVerb::Get, QStringLiteral("GetPushersJob"), + basePath % "/pushers") , d(new Private) {} @@ -79,12 +74,10 @@ BaseJob::Status GetPushersJob::parseJson(const QJsonDocument& data) } // Converters -namespace Quotient -{ +namespace Quotient { template <> -struct JsonObjectConverter -{ +struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const PostPusherJob::PusherData& pod) { addParam(jo, QStringLiteral("url"), pod.url); @@ -94,14 +87,13 @@ struct JsonObjectConverter } // namespace Quotient -static const auto PostPusherJobName = QStringLiteral("PostPusherJob"); - PostPusherJob::PostPusherJob(const QString& pushkey, const QString& kind, const QString& appId, const QString& appDisplayName, const QString& deviceDisplayName, const QString& lang, const PusherData& data, const QString& profileTag, Omittable append) - : BaseJob(HttpVerb::Post, PostPusherJobName, basePath % "/pushers/set") + : BaseJob(HttpVerb::Post, QStringLiteral("PostPusherJob"), + basePath % "/pushers/set") { QJsonObject _data; addParam<>(_data, QStringLiteral("pushkey"), pushkey); -- cgit v1.2.3