aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/event.cpp3
-rw-r--r--lib/events/stateevent.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/events/event.cpp b/lib/events/event.cpp
index c98dfbb6..6505d89a 100644
--- a/lib/events/event.cpp
+++ b/lib/events/event.cpp
@@ -38,7 +38,8 @@ event_type_t EventTypeRegistry::initializeTypeId(event_mtype_t matrixTypeId)
QString EventTypeRegistry::getMatrixType(event_type_t typeId)
{
- return typeId < get().eventTypes.size() ? get().eventTypes[typeId] : "";
+ return typeId < get().eventTypes.size()
+ ? get().eventTypes[typeId] : QString();
}
Event::Event(Type type, const QJsonObject& json)
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp
index e96614d2..a84f302b 100644
--- a/lib/events/stateevent.cpp
+++ b/lib/events/stateevent.cpp
@@ -27,7 +27,7 @@ using namespace QMatrixClient;
RoomEvent::factory_t::addMethod(
[] (const QJsonObject& json, const QString& matrixType) -> StateEventPtr
{
- if (!json.contains("state_key"))
+ if (!json.contains("state_key"_ls))
return nullptr;
if (auto e = StateEventBase::factory_t::make(json, matrixType))