diff options
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/event.cpp | 5 | ||||
-rw-r--r-- | lib/events/event.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/events/event.cpp b/lib/events/event.cpp index 2cad1462..fd6e3939 100644 --- a/lib/events/event.cpp +++ b/lib/events/event.cpp @@ -36,6 +36,11 @@ event_type_t EventTypeRegistry::initializeTypeId(event_mtype_t matrixTypeId) return id; } +QString EventTypeRegistry::getMatrixType(event_type_t typeId) +{ + return typeId < get().eventTypes.size() ? get().eventTypes[typeId] : ""; +} + Event::Event(Type type, const QJsonObject& json) : _type(type), _json(json) { diff --git a/lib/events/event.h b/lib/events/event.h index 95f79da0..2a03f77a 100644 --- a/lib/events/event.h +++ b/lib/events/event.h @@ -87,11 +87,7 @@ namespace QMatrixClient return initializeTypeId(EventT::matrixTypeId()); } - static event_mtype_t getMatrixType(event_type_t typeId) - { - return typeId < get().eventTypes.size() - ? get().eventTypes[typeId] : ""; - } + static QString getMatrixType(event_type_t typeId); private: EventTypeRegistry() = default; |