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/room_state.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/room_state.cpp')
-rw-r--r-- | lib/csapi/room_state.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/csapi/room_state.cpp b/lib/csapi/room_state.cpp index 3aa7d736..668a2931 100644 --- a/lib/csapi/room_state.cpp +++ b/lib/csapi/room_state.cpp @@ -15,25 +15,27 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); class SetRoomStateWithKeyJob::Private { public: - QString eventId; + QString eventId; }; -static const auto SetRoomStateWithKeyJobName = QStringLiteral("SetRoomStateWithKeyJob"); +static const auto SetRoomStateWithKeyJobName = + QStringLiteral("SetRoomStateWithKeyJob"); -SetRoomStateWithKeyJob::SetRoomStateWithKeyJob(const QString& roomId, const QString& eventType, const QString& stateKey, const QJsonObject& body) +SetRoomStateWithKeyJob::SetRoomStateWithKeyJob(const QString& roomId, + const QString& eventType, + const QString& stateKey, + const QJsonObject& body) : BaseJob(HttpVerb::Put, SetRoomStateWithKeyJobName, - basePath % "/rooms/" % roomId % "/state/" % eventType % "/" % stateKey) - , d(new Private) + basePath % "/rooms/" % roomId % "/state/" % eventType % "/" + % stateKey), + d(new Private) { setRequestData(Data(toJson(body))); } SetRoomStateWithKeyJob::~SetRoomStateWithKeyJob() = default; -const QString& SetRoomStateWithKeyJob::eventId() const -{ - return d->eventId; -} +const QString& SetRoomStateWithKeyJob::eventId() const { return d->eventId; } BaseJob::Status SetRoomStateWithKeyJob::parseJson(const QJsonDocument& data) { @@ -45,25 +47,24 @@ BaseJob::Status SetRoomStateWithKeyJob::parseJson(const QJsonDocument& data) class SetRoomStateJob::Private { public: - QString eventId; + QString eventId; }; static const auto SetRoomStateJobName = QStringLiteral("SetRoomStateJob"); -SetRoomStateJob::SetRoomStateJob(const QString& roomId, const QString& eventType, const QJsonObject& body) +SetRoomStateJob::SetRoomStateJob(const QString& roomId, + const QString& eventType, + const QJsonObject& body) : BaseJob(HttpVerb::Put, SetRoomStateJobName, - basePath % "/rooms/" % roomId % "/state/" % eventType) - , d(new Private) + basePath % "/rooms/" % roomId % "/state/" % eventType), + d(new Private) { setRequestData(Data(toJson(body))); } SetRoomStateJob::~SetRoomStateJob() = default; -const QString& SetRoomStateJob::eventId() const -{ - return d->eventId; -} +const QString& SetRoomStateJob::eventId() const { return d->eventId; } BaseJob::Status SetRoomStateJob::parseJson(const QJsonDocument& data) { @@ -71,4 +72,3 @@ BaseJob::Status SetRoomStateJob::parseJson(const QJsonDocument& data) fromJson(json.value("event_id"_ls), d->eventId); return Success; } - |