diff options
author | Marc Deop <marc@marcdeop.com> | 2019-03-02 12:26:57 +0100 |
---|---|---|
committer | Marc Deop <marc@marcdeop.com> | 2019-03-02 12:26:57 +0100 |
commit | aacc4bcb4a487871daae6717f77605aaba444341 (patch) | |
tree | 4f50b6874821667ccb6b91c017e5d041e3846112 /lib/csapi/directory.cpp | |
parent | c971b924cd62822ed6fb1a0291c483ae73a3ecda (diff) | |
download | libquotient-aacc4bcb4a487871daae6717f77605aaba444341.tar.gz libquotient-aacc4bcb4a487871daae6717f77605aaba444341.zip |
style: apply .clang-format to all .cpp and .h files
Diffstat (limited to 'lib/csapi/directory.cpp')
-rw-r--r-- | lib/csapi/directory.cpp | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/lib/csapi/directory.cpp b/lib/csapi/directory.cpp index 4af86f7b..b4282ffb 100644 --- a/lib/csapi/directory.cpp +++ b/lib/csapi/directory.cpp @@ -14,9 +14,10 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0/directory"); static const auto SetRoomAliasJobName = QStringLiteral("SetRoomAliasJob"); -SetRoomAliasJob::SetRoomAliasJob(const QString& roomAlias, const QString& roomId) +SetRoomAliasJob::SetRoomAliasJob(const QString& roomAlias, + const QString& roomId) : BaseJob(HttpVerb::Put, SetRoomAliasJobName, - basePath % "/room/" % roomAlias) + basePath % "/room/" % roomAlias) { QJsonObject _data; addParam<>(_data, QStringLiteral("room_id"), roomId); @@ -26,36 +27,31 @@ SetRoomAliasJob::SetRoomAliasJob(const QString& roomAlias, const QString& roomId class GetRoomIdByAliasJob::Private { public: - QString roomId; - QStringList servers; + QString roomId; + QStringList servers; }; QUrl GetRoomIdByAliasJob::makeRequestUrl(QUrl baseUrl, const QString& roomAlias) { return BaseJob::makeRequestUrl(std::move(baseUrl), - basePath % "/room/" % roomAlias); + basePath % "/room/" % roomAlias); } -static const auto GetRoomIdByAliasJobName = QStringLiteral("GetRoomIdByAliasJob"); +static const auto GetRoomIdByAliasJobName = + QStringLiteral("GetRoomIdByAliasJob"); GetRoomIdByAliasJob::GetRoomIdByAliasJob(const QString& roomAlias) : BaseJob(HttpVerb::Get, GetRoomIdByAliasJobName, - basePath % "/room/" % roomAlias, false) - , d(new Private) + basePath % "/room/" % roomAlias, false), + d(new Private) { } GetRoomIdByAliasJob::~GetRoomIdByAliasJob() = default; -const QString& GetRoomIdByAliasJob::roomId() const -{ - return d->roomId; -} +const QString& GetRoomIdByAliasJob::roomId() const { return d->roomId; } -const QStringList& GetRoomIdByAliasJob::servers() const -{ - return d->servers; -} +const QStringList& GetRoomIdByAliasJob::servers() const { return d->servers; } BaseJob::Status GetRoomIdByAliasJob::parseJson(const QJsonDocument& data) { @@ -68,14 +64,13 @@ BaseJob::Status GetRoomIdByAliasJob::parseJson(const QJsonDocument& data) QUrl DeleteRoomAliasJob::makeRequestUrl(QUrl baseUrl, const QString& roomAlias) { return BaseJob::makeRequestUrl(std::move(baseUrl), - basePath % "/room/" % roomAlias); + basePath % "/room/" % roomAlias); } static const auto DeleteRoomAliasJobName = QStringLiteral("DeleteRoomAliasJob"); DeleteRoomAliasJob::DeleteRoomAliasJob(const QString& roomAlias) : BaseJob(HttpVerb::Delete, DeleteRoomAliasJobName, - basePath % "/room/" % roomAlias) + basePath % "/room/" % roomAlias) { } - |