aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roompowerlevelsevent.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-12-10 19:26:23 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-01-23 22:40:20 +0100
commit08612cb253417fe70ef45a1ad08663a0745d748a (patch)
tree832f57e533a0f07365f6e20b091ddfc18f9169f4 /lib/events/roompowerlevelsevent.h
parent9ae0d4e45befc79f621b03dc4efe869cd4277e06 (diff)
downloadlibquotient-08612cb253417fe70ef45a1ad08663a0745d748a.tar.gz
libquotient-08612cb253417fe70ef45a1ad08663a0745d748a.zip
No more default construction of events
Default construction was only done to support stubbed state in Room and even that did not really use those, opting to construct an event from an empty QJsonObject instead. Now that Room doesn't have stubbed state, default constructors are even less needed.
Diffstat (limited to 'lib/events/roompowerlevelsevent.h')
-rw-r--r--lib/events/roompowerlevelsevent.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/events/roompowerlevelsevent.h b/lib/events/roompowerlevelsevent.h
index 80e27048..415cc814 100644
--- a/lib/events/roompowerlevelsevent.h
+++ b/lib/events/roompowerlevelsevent.h
@@ -36,10 +36,12 @@ protected:
class QUOTIENT_API RoomPowerLevelsEvent
: public StateEvent<PowerLevelsEventContent> {
- Q_GADGET
public:
DEFINE_EVENT_TYPEID("m.room.power_levels", RoomPowerLevelsEvent)
+ explicit RoomPowerLevelsEvent(PowerLevelsEventContent&& content)
+ : StateEvent(typeId(), matrixTypeId(), QString(), std::move(content))
+ {}
explicit RoomPowerLevelsEvent(const QJsonObject& obj)
: StateEvent(typeId(), obj)
{}