aboutsummaryrefslogtreecommitdiff
path: root/events/roomnameevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'events/roomnameevent.h')
-rw-r--r--events/roomnameevent.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/events/roomnameevent.h b/events/roomnameevent.h
index 8748c4be..bb823933 100644
--- a/events/roomnameevent.h
+++ b/events/roomnameevent.h
@@ -22,18 +22,17 @@
namespace QMatrixClient
{
- class RoomNameEvent : public Event
+ class RoomNameEvent : public RoomEvent
{
public:
- RoomNameEvent();
- virtual ~RoomNameEvent();
+ explicit RoomNameEvent(const QJsonObject& obj)
+ : RoomEvent(Type::RoomName, obj)
+ , _name(contentJson()["name"].toString())
+ { }
- QString name() const;
-
- static RoomNameEvent* fromJson(const QJsonObject& obj);
+ QString name() const { return _name; }
private:
- class Private;
- Private *d;
+ QString _name{};
};
-}
+} // namespace QMatrixClient