From f3221451ce29c3b571e08fe3ce51a49f252029e5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 4 Nov 2018 16:06:29 +0900 Subject: DEFINE_SIMPLE_STATE_EVENT: fix construction from an rvalue QJsonObject --- lib/events/simplestateevents.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h index 9a212612..3a59ad6d 100644 --- a/lib/events/simplestateevents.h +++ b/lib/events/simplestateevents.h @@ -65,8 +65,9 @@ namespace QMatrixClient public: \ using value_type = content_type::value_type; \ DEFINE_EVENT_TYPEID(_TypeId, _Name) \ - explicit _Name(const QJsonObject& obj) \ - : StateEvent(typeId(), obj, QStringLiteral(#_ContentKey)) \ + explicit _Name(QJsonObject obj) \ + : StateEvent(typeId(), std::move(obj), \ + QStringLiteral(#_ContentKey)) \ { } \ template \ explicit _Name(T&& value) \ -- cgit v1.2.3