aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/list_joined_rooms.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-03 17:29:52 +0900
committerGitHub <noreply@github.com>2019-08-03 17:29:52 +0900
commit66e116b7b1e848e80577a0229c8995db0a54932e (patch)
tree763340439a0f4034e9c829d76cb1ffe9766b83c5 /lib/csapi/list_joined_rooms.cpp
parent5b236dfe895c7766002559570aa29c9033009228 (diff)
parentc05ade838f0fce81f2bbe80a3295618a8a26ff52 (diff)
downloadlibquotient-66e116b7b1e848e80577a0229c8995db0a54932e.tar.gz
libquotient-66e116b7b1e848e80577a0229c8995db0a54932e.zip
Merge pull request #295 from marcdeop/140_impose_coding_standard
140 impose coding standard
Diffstat (limited to 'lib/csapi/list_joined_rooms.cpp')
-rw-r--r--lib/csapi/list_joined_rooms.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/csapi/list_joined_rooms.cpp b/lib/csapi/list_joined_rooms.cpp
index 297a5ae0..43c948f7 100644
--- a/lib/csapi/list_joined_rooms.cpp
+++ b/lib/csapi/list_joined_rooms.cpp
@@ -14,24 +14,22 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0");
class GetJoinedRoomsJob::Private
{
- public:
- QStringList joinedRooms;
+public:
+ QStringList joinedRooms;
};
QUrl GetJoinedRoomsJob::makeRequestUrl(QUrl baseUrl)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/joined_rooms");
+ basePath % "/joined_rooms");
}
static const auto GetJoinedRoomsJobName = QStringLiteral("GetJoinedRoomsJob");
GetJoinedRoomsJob::GetJoinedRoomsJob()
- : BaseJob(HttpVerb::Get, GetJoinedRoomsJobName,
- basePath % "/joined_rooms")
+ : BaseJob(HttpVerb::Get, GetJoinedRoomsJobName, basePath % "/joined_rooms")
, d(new Private)
-{
-}
+{}
GetJoinedRoomsJob::~GetJoinedRoomsJob() = default;
@@ -45,8 +43,8 @@ BaseJob::Status GetJoinedRoomsJob::parseJson(const QJsonDocument& data)
auto json = data.object();
if (!json.contains("joined_rooms"_ls))
return { IncorrectResponse,
- "The key 'joined_rooms' not found in the response" };
+ "The key 'joined_rooms' not found in the response" };
fromJson(json.value("joined_rooms"_ls), d->joinedRooms);
+
return Success;
}
-