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/peeking_events.cpp | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'lib/csapi/peeking_events.cpp') diff --git a/lib/csapi/peeking_events.cpp b/lib/csapi/peeking_events.cpp index 3208d48d..d48eca3f 100644 --- a/lib/csapi/peeking_events.cpp +++ b/lib/csapi/peeking_events.cpp @@ -15,12 +15,13 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); class PeekEventsJob::Private { public: - QString begin; - QString end; - RoomEvents chunk; + QString begin; + QString end; + RoomEvents chunk; }; -BaseJob::Query queryToPeekEvents(const QString& from, Omittable timeout, const QString& roomId) +BaseJob::Query queryToPeekEvents(const QString& from, Omittable timeout, + const QString& roomId) { BaseJob::Query _q; addParam(_q, QStringLiteral("from"), from); @@ -29,39 +30,31 @@ BaseJob::Query queryToPeekEvents(const QString& from, Omittable timeout, co return _q; } -QUrl PeekEventsJob::makeRequestUrl(QUrl baseUrl, const QString& from, Omittable timeout, const QString& roomId) +QUrl PeekEventsJob::makeRequestUrl(QUrl baseUrl, const QString& from, + Omittable timeout, + const QString& roomId) { - return BaseJob::makeRequestUrl(std::move(baseUrl), - basePath % "/events", - queryToPeekEvents(from, timeout, roomId)); + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/events", + queryToPeekEvents(from, timeout, roomId)); } static const auto PeekEventsJobName = QStringLiteral("PeekEventsJob"); -PeekEventsJob::PeekEventsJob(const QString& from, Omittable timeout, const QString& roomId) - : BaseJob(HttpVerb::Get, PeekEventsJobName, - basePath % "/events", - queryToPeekEvents(from, timeout, roomId)) - , d(new Private) +PeekEventsJob::PeekEventsJob(const QString& from, Omittable timeout, + const QString& roomId) + : BaseJob(HttpVerb::Get, PeekEventsJobName, basePath % "/events", + queryToPeekEvents(from, timeout, roomId)), + d(new Private) { } PeekEventsJob::~PeekEventsJob() = default; -const QString& PeekEventsJob::begin() const -{ - return d->begin; -} +const QString& PeekEventsJob::begin() const { return d->begin; } -const QString& PeekEventsJob::end() const -{ - return d->end; -} +const QString& PeekEventsJob::end() const { return d->end; } -RoomEvents&& PeekEventsJob::chunk() -{ - return std::move(d->chunk); -} +RoomEvents&& PeekEventsJob::chunk() { return std::move(d->chunk); } BaseJob::Status PeekEventsJob::parseJson(const QJsonDocument& data) { @@ -71,4 +64,3 @@ BaseJob::Status PeekEventsJob::parseJson(const QJsonDocument& data) fromJson(json.value("chunk"_ls), d->chunk); return Success; } - -- 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/peeking_events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/csapi/peeking_events.cpp') diff --git a/lib/csapi/peeking_events.cpp b/lib/csapi/peeking_events.cpp index 6962d363..bc29b682 100644 --- a/lib/csapi/peeking_events.cpp +++ b/lib/csapi/peeking_events.cpp @@ -8,7 +8,7 @@ #include -using namespace QMatrixClient; +using namespace Quotient; static const auto basePath = QStringLiteral("/_matrix/client/r0"); -- cgit v1.2.3