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/events/callinviteevent.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lib/events/callinviteevent.h') diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h index d5315309..911ccf96 100644 --- a/lib/events/callinviteevent.h +++ b/lib/events/callinviteevent.h @@ -13,29 +13,34 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #pragma once #include "roomevent.h" -namespace QMatrixClient -{ - class CallInviteEvent: public CallEventBase +namespace QMatrixClient { + class CallInviteEvent : public CallEventBase { - public: + public: DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent) - + explicit CallInviteEvent(const QJsonObject& obj); explicit CallInviteEvent(const QString& callId, const int lifetime, const QString& sdp); - int lifetime() const { return content("lifetime"_ls); } // FIXME: Omittable<>? - QString sdp() const { - return contentJson()["offer"_ls].toObject() - .value("sdp"_ls).toString(); + int lifetime() const + { + return content("lifetime"_ls); + } // FIXME: Omittable<>? + QString sdp() const + { + return contentJson()["offer"_ls] + .toObject() + .value("sdp"_ls) + .toString(); } }; -- cgit v1.2.3 From c05ade838f0fce81f2bbe80a3295618a8a26ff52 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 2 Aug 2019 19:59:40 +0900 Subject: Apply the new brace wrapping to source files --- lib/events/callinviteevent.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/events/callinviteevent.h') diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h index 4334ca5b..9b9d0ae5 100644 --- a/lib/events/callinviteevent.h +++ b/lib/events/callinviteevent.h @@ -20,10 +20,8 @@ #include "roomevent.h" -namespace QMatrixClient -{ -class CallInviteEvent : public CallEventBase -{ +namespace QMatrixClient { +class CallInviteEvent : public CallEventBase { public: DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent) -- 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/events/callinviteevent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/events/callinviteevent.h') diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h index 9b9d0ae5..3e39e0ba 100644 --- a/lib/events/callinviteevent.h +++ b/lib/events/callinviteevent.h @@ -20,7 +20,7 @@ #include "roomevent.h" -namespace QMatrixClient { +namespace Quotient { class CallInviteEvent : public CallEventBase { public: DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent) @@ -42,4 +42,4 @@ public: REGISTER_EVENT_TYPE(CallInviteEvent) DEFINE_EVENTTYPE_ALIAS(CallInvite, CallInviteEvent) -} // namespace QMatrixClient +} // namespace Quotient -- cgit v1.2.3 From 9ce16ef3123d5e63b931cafefb7dba4e894fc82b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 11 Aug 2019 13:18:40 +0900 Subject: Drop EventType namespace and DEFINE_EVENTTYPE_ALIAS macro They've been deprecated for almost a year by now. --- lib/events/callinviteevent.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/events/callinviteevent.h') diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h index 3e39e0ba..b067a492 100644 --- a/lib/events/callinviteevent.h +++ b/lib/events/callinviteevent.h @@ -41,5 +41,4 @@ public: }; REGISTER_EVENT_TYPE(CallInviteEvent) -DEFINE_EVENTTYPE_ALIAS(CallInvite, CallInviteEvent) } // namespace Quotient -- cgit v1.2.3