diff options
author | Roman Plášil <me@rplasil.name> | 2017-08-27 12:32:00 +0800 |
---|---|---|
committer | Roman Plášil <me@rplasil.name> | 2017-08-27 12:32:00 +0800 |
commit | 1a00b1c38c0957df9758b0edeff4559f2515fe5e (patch) | |
tree | 39e514647cdeb71d7d63891149e164aae8352986 /connection.cpp | |
parent | 456604040ce9cf3c22b726e8ef279a1fe4a85f39 (diff) | |
download | libquotient-1a00b1c38c0957df9758b0edeff4559f2515fe5e.tar.gz libquotient-1a00b1c38c0957df9758b0edeff4559f2515fe5e.zip |
Use QJsonObject.insert and QStringLiteral
Diffstat (limited to 'connection.cpp')
-rw-r--r-- | connection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/connection.cpp b/connection.cpp index 136ccda1..89da47cd 100644 --- a/connection.cpp +++ b/connection.cpp @@ -351,14 +351,14 @@ void Connection::saveState() { } QJsonObject roomObj; - roomObj["leave"] = QJsonObject(); - roomObj["join"] = rooms; - roomObj["invite"] = QJsonObject(); + roomObj.insert("leave", QJsonObject()); + roomObj.insert("join", rooms); + roomObj.insert("invite", QJsonObject()); QJsonObject rootObj; - rootObj["next_batch"] = d->data->lastEvent(); - rootObj["presence"] = QJsonObject(); - rootObj["rooms"] = roomObj; + rootObj.insert("next_batch", d->data->lastEvent()); + rootObj.insert("presence", QJsonObject()); + rootObj.insert("rooms", roomObj); QJsonDocument doc { rootObj }; QByteArray data = doc.toJson(); |