From 19746de7426aeb67eb90e8c48448356691e270b0 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 9 Jun 2022 10:19:14 +0200 Subject: Use QUO_CONTENT_GETTER In keyverificationevent.*, this massively shortens repetitive getter definitions; the remaining few non-trivial ones are moved to keyverificationevent.h, dropping the respective .cpp file and therefore the dedicated translation unit. In roomkeyevent.h, it's just shorter. --- lib/events/roomkeyevent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/events/roomkeyevent.h') diff --git a/lib/events/roomkeyevent.h b/lib/events/roomkeyevent.h index 3093db41..9eb2854b 100644 --- a/lib/events/roomkeyevent.h +++ b/lib/events/roomkeyevent.h @@ -16,9 +16,9 @@ public: const QString& sessionId, const QString& sessionKey, const QString& senderId); - QString algorithm() const { return contentPart("algorithm"_ls); } - QString roomId() const { return contentPart(RoomIdKeyL); } - QString sessionId() const { return contentPart("session_id"_ls); } + QUO_CONTENT_GETTER(QString, algorithm) + QUO_CONTENT_GETTER(QString, roomId) + QUO_CONTENT_GETTER(QString, sessionId) QByteArray sessionKey() const { return contentPart("session_key"_ls).toLatin1(); -- cgit v1.2.3