diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-04 16:06:29 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-04 16:06:29 +0900 |
commit | f3221451ce29c3b571e08fe3ce51a49f252029e5 (patch) | |
tree | 71f49dd7bce85844db2fc7a544473b68014df537 | |
parent | 04435ef1d621b18ad837cdcb4b06155952f51f0c (diff) | |
download | libquotient-f3221451ce29c3b571e08fe3ce51a49f252029e5.tar.gz libquotient-f3221451ce29c3b571e08fe3ce51a49f252029e5.zip |
DEFINE_SIMPLE_STATE_EVENT: fix construction from an rvalue QJsonObject
-rw-r--r-- | lib/events/simplestateevents.h | 5 |
1 files 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 <typename T> \ explicit _Name(T&& value) \ |