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/csapi/definitions/public_rooms_response.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lib/csapi/definitions/public_rooms_response.cpp') diff --git a/lib/csapi/definitions/public_rooms_response.cpp b/lib/csapi/definitions/public_rooms_response.cpp index 0d26662c..199a7a93 100644 --- a/lib/csapi/definitions/public_rooms_response.cpp +++ b/lib/csapi/definitions/public_rooms_response.cpp @@ -6,11 +6,12 @@ using namespace QMatrixClient; -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const PublicRoomsChunk& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, + const PublicRoomsChunk& pod) { addParam(jo, QStringLiteral("aliases"), pod.aliases); - addParam(jo, QStringLiteral("canonical_alias"), pod.canonicalAlias); + addParam(jo, QStringLiteral("canonical_alias"), + pod.canonicalAlias); addParam(jo, QStringLiteral("name"), pod.name); addParam<>(jo, QStringLiteral("num_joined_members"), pod.numJoinedMembers); addParam<>(jo, QStringLiteral("room_id"), pod.roomId); @@ -20,8 +21,8 @@ void JsonObjectConverter::dumpTo( addParam(jo, QStringLiteral("avatar_url"), pod.avatarUrl); } -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, PublicRoomsChunk& result) +void JsonObjectConverter::fillFrom(const QJsonObject& jo, + PublicRoomsChunk& result) { fromJson(jo.value("aliases"_ls), result.aliases); fromJson(jo.value("canonical_alias"_ls), result.canonicalAlias); @@ -40,15 +41,16 @@ void JsonObjectConverter::dumpTo( addParam<>(jo, QStringLiteral("chunk"), pod.chunk); addParam(jo, QStringLiteral("next_batch"), pod.nextBatch); addParam(jo, QStringLiteral("prev_batch"), pod.prevBatch); - addParam(jo, QStringLiteral("total_room_count_estimate"), pod.totalRoomCountEstimate); + addParam(jo, QStringLiteral("total_room_count_estimate"), + pod.totalRoomCountEstimate); } void JsonObjectConverter::fillFrom( - const QJsonObject& jo, PublicRoomsResponse& result) + const QJsonObject& jo, PublicRoomsResponse& result) { fromJson(jo.value("chunk"_ls), result.chunk); fromJson(jo.value("next_batch"_ls), result.nextBatch); fromJson(jo.value("prev_batch"_ls), result.prevBatch); - fromJson(jo.value("total_room_count_estimate"_ls), result.totalRoomCountEstimate); + fromJson(jo.value("total_room_count_estimate"_ls), + result.totalRoomCountEstimate); } - -- cgit v1.2.3 From 9e96bc9b8dec6613e3e2f2fd564e9f6bee9bbce4 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 24 Jun 2019 07:38:50 +0900 Subject: csapi/*/**: clang-format contents of csapi subdirs as well --- lib/csapi/definitions/public_rooms_response.cpp | 36 +++++++++++-------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'lib/csapi/definitions/public_rooms_response.cpp') diff --git a/lib/csapi/definitions/public_rooms_response.cpp b/lib/csapi/definitions/public_rooms_response.cpp index 2c03b7d3..d07b1494 100644 --- a/lib/csapi/definitions/public_rooms_response.cpp +++ b/lib/csapi/definitions/public_rooms_response.cpp @@ -4,14 +4,14 @@ #include "public_rooms_response.h" - using namespace QMatrixClient; - -void JsonObjectConverter::dumpTo(QJsonObject& jo, const PublicRoomsChunk& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, + const PublicRoomsChunk& pod) { addParam(jo, QStringLiteral("aliases"), pod.aliases); - addParam(jo, QStringLiteral("canonical_alias"), pod.canonicalAlias); + addParam(jo, QStringLiteral("canonical_alias"), + pod.canonicalAlias); addParam(jo, QStringLiteral("name"), pod.name); addParam<>(jo, QStringLiteral("num_joined_members"), pod.numJoinedMembers); addParam<>(jo, QStringLiteral("room_id"), pod.roomId); @@ -19,10 +19,10 @@ void JsonObjectConverter::dumpTo(QJsonObject& jo, const Public addParam<>(jo, QStringLiteral("world_readable"), pod.worldReadable); addParam<>(jo, QStringLiteral("guest_can_join"), pod.guestCanJoin); addParam(jo, QStringLiteral("avatar_url"), pod.avatarUrl); - } - -void JsonObjectConverter::fillFrom(const QJsonObject& jo, PublicRoomsChunk& result) + +void JsonObjectConverter::fillFrom(const QJsonObject& jo, + PublicRoomsChunk& result) { fromJson(jo.value("aliases"_ls), result.aliases); fromJson(jo.value("canonical_alias"_ls), result.canonicalAlias); @@ -33,28 +33,24 @@ void JsonObjectConverter::fillFrom(const QJsonObject& jo, Publ fromJson(jo.value("world_readable"_ls), result.worldReadable); fromJson(jo.value("guest_can_join"_ls), result.guestCanJoin); fromJson(jo.value("avatar_url"_ls), result.avatarUrl); - } - - -void JsonObjectConverter::dumpTo(QJsonObject& jo, const PublicRoomsResponse& pod) +void JsonObjectConverter::dumpTo( + QJsonObject& jo, const PublicRoomsResponse& pod) { addParam<>(jo, QStringLiteral("chunk"), pod.chunk); addParam(jo, QStringLiteral("next_batch"), pod.nextBatch); addParam(jo, QStringLiteral("prev_batch"), pod.prevBatch); - addParam(jo, QStringLiteral("total_room_count_estimate"), pod.totalRoomCountEstimate); - + addParam(jo, QStringLiteral("total_room_count_estimate"), + pod.totalRoomCountEstimate); } - -void JsonObjectConverter::fillFrom(const QJsonObject& jo, PublicRoomsResponse& result) + +void JsonObjectConverter::fillFrom( + const QJsonObject& jo, PublicRoomsResponse& result) { fromJson(jo.value("chunk"_ls), result.chunk); fromJson(jo.value("next_batch"_ls), result.nextBatch); fromJson(jo.value("prev_batch"_ls), result.prevBatch); - fromJson(jo.value("total_room_count_estimate"_ls), result.totalRoomCountEstimate); - + fromJson(jo.value("total_room_count_estimate"_ls), + result.totalRoomCountEstimate); } - - - -- cgit v1.2.3 From 27ca32a1e5a56e09b9cc1d94224d2831004dcf3d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 19:32:34 +0900 Subject: Namespace: QMatrixClient -> Quotient (with back comp alias) --- lib/csapi/definitions/public_rooms_response.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/csapi/definitions/public_rooms_response.cpp') diff --git a/lib/csapi/definitions/public_rooms_response.cpp b/lib/csapi/definitions/public_rooms_response.cpp index d07b1494..b6009718 100644 --- a/lib/csapi/definitions/public_rooms_response.cpp +++ b/lib/csapi/definitions/public_rooms_response.cpp @@ -4,7 +4,7 @@ #include "public_rooms_response.h" -using namespace QMatrixClient; +using namespace Quotient; void JsonObjectConverter::dumpTo(QJsonObject& jo, const PublicRoomsChunk& pod) -- cgit v1.2.3