From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/identity/definitions/request_email_validation.cpp | 3 +-- lib/identity/definitions/request_email_validation.h | 16 +++++++--------- lib/identity/definitions/request_msisdn_validation.cpp | 3 +-- lib/identity/definitions/request_msisdn_validation.h | 16 +++++++--------- lib/identity/definitions/sid.cpp | 7 ++----- lib/identity/definitions/sid.h | 18 +++++++----------- 6 files changed, 25 insertions(+), 38 deletions(-) (limited to 'lib/identity') diff --git a/lib/identity/definitions/request_email_validation.cpp b/lib/identity/definitions/request_email_validation.cpp index 47463a8b..a2d0a707 100644 --- a/lib/identity/definitions/request_email_validation.cpp +++ b/lib/identity/definitions/request_email_validation.cpp @@ -16,11 +16,10 @@ void JsonObjectConverter::dumpTo( } void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestEmailValidation& result) + const QJsonObject& jo, RequestEmailValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("email"_ls), result.email); fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_email_validation.h b/lib/identity/definitions/request_email_validation.h index eb7d8ed6..51369039 100644 --- a/lib/identity/definitions/request_email_validation.h +++ b/lib/identity/definitions/request_email_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestEmailValidation - { + struct RequestEmailValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The email address to validate. QString email; @@ -33,10 +31,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestEmailValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestEmailValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestEmailValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp index a123d326..9facbf7e 100644 --- a/lib/identity/definitions/request_msisdn_validation.cpp +++ b/lib/identity/definitions/request_msisdn_validation.cpp @@ -17,7 +17,7 @@ void JsonObjectConverter::dumpTo( } void JsonObjectConverter::fillFrom( - const QJsonObject& jo, RequestMsisdnValidation& result) + const QJsonObject& jo, RequestMsisdnValidation& result) { fromJson(jo.value("client_secret"_ls), result.clientSecret); fromJson(jo.value("country"_ls), result.country); @@ -25,4 +25,3 @@ void JsonObjectConverter::fillFrom( fromJson(jo.value("send_attempt"_ls), result.sendAttempt); fromJson(jo.value("next_link"_ls), result.nextLink); } - diff --git a/lib/identity/definitions/request_msisdn_validation.h b/lib/identity/definitions/request_msisdn_validation.h index b48ed6d5..c4fe479e 100644 --- a/lib/identity/definitions/request_msisdn_validation.h +++ b/lib/identity/definitions/request_msisdn_validation.h @@ -8,16 +8,14 @@ #include "converters.h" -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct RequestMsisdnValidation - { + struct RequestMsisdnValidation { /// A unique string generated by the client, and used to identify the /// validation attempt. It must be a string consisting of the characters - /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it - /// must not be empty. + /// ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and + /// it must not be empty. QString clientSecret; /// The two-letter uppercase ISO country code that the number in /// ``phone_number`` should be parsed as if it were dialled from. @@ -36,10 +34,10 @@ namespace QMatrixClient /// server will redirect the user to this URL. QString nextLink; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const RequestMsisdnValidation& pod); - static void fillFrom(const QJsonObject& jo, RequestMsisdnValidation& pod); + static void fillFrom(const QJsonObject& jo, + RequestMsisdnValidation& pod); }; } // namespace QMatrixClient diff --git a/lib/identity/definitions/sid.cpp b/lib/identity/definitions/sid.cpp index 1ba4b3b5..cc6973f2 100644 --- a/lib/identity/definitions/sid.cpp +++ b/lib/identity/definitions/sid.cpp @@ -6,15 +6,12 @@ using namespace QMatrixClient; -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const Sid& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, const Sid& pod) { addParam<>(jo, QStringLiteral("sid"), pod.sid); } -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, Sid& result) +void JsonObjectConverter::fillFrom(const QJsonObject& jo, Sid& result) { fromJson(jo.value("sid"_ls), result.sid); } - diff --git a/lib/identity/definitions/sid.h b/lib/identity/definitions/sid.h index ac8c4130..85462b46 100644 --- a/lib/identity/definitions/sid.h +++ b/lib/identity/definitions/sid.h @@ -6,21 +6,17 @@ #include "converters.h" - -namespace QMatrixClient -{ +namespace QMatrixClient { // Data structures - struct Sid - { - /// The session ID. Session IDs are opaque strings generated by the identity - /// server. They must consist entirely of the characters - /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and they - /// must not be empty. + struct Sid { + /// The session ID. Session IDs are opaque strings generated by the + /// identity server. They must consist entirely of the characters + /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and + /// they must not be empty. QString sid; }; - template <> struct JsonObjectConverter - { + template <> struct JsonObjectConverter { static void dumpTo(QJsonObject& jo, const Sid& pod); static void fillFrom(const QJsonObject& jo, Sid& pod); }; -- cgit v1.2.3