diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-04-04 21:27:38 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-04-06 20:32:48 +0900 |
commit | 432e7fd7107d8260e0016a1adcd8d94263dc1044 (patch) | |
tree | 71171a541e508f7a97b1d843c707c7ef296374cb /lib/syncdata.cpp | |
parent | 8035ec464ce797abab5e464c2cfb485f7fa14d06 (diff) | |
download | libquotient-432e7fd7107d8260e0016a1adcd8d94263dc1044.tar.gz libquotient-432e7fd7107d8260e0016a1adcd8d94263dc1044.zip |
Clean up on clang-tidy/clazy analysis
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r-- | lib/syncdata.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index f55d4396..21517884 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -72,7 +72,7 @@ void JsonObjectConverter<RoomSummary>::fillFrom(const QJsonObject& jo, { fromJson(jo["m.joined_member_count"_ls], rs.joinedMemberCount); fromJson(jo["m.invited_member_count"_ls], rs.invitedMemberCount); - fromJson(jo["m.heroes"], rs.heroes); + fromJson(jo["m.heroes"_ls], rs.heroes); } template <typename EventsArrayT, typename StrT> @@ -85,7 +85,7 @@ SyncRoomData::SyncRoomData(const QString& roomId_, JoinState joinState_, const QJsonObject& room_) : roomId(roomId_) , joinState(joinState_) - , summary(fromJson<RoomSummary>(room_["summary"])) + , summary(fromJson<RoomSummary>(room_["summary"_ls])) , state(load<StateEvents>(room_, joinState == JoinState::Invite ? "invite_state"_ls : "state"_ls)) { @@ -121,8 +121,8 @@ SyncData::SyncData(const QString& cacheFileName) QFileInfo cacheFileInfo { cacheFileName }; auto json = loadJson(cacheFileName); auto requiredVersion = std::get<0>(cacheVersion()); - auto actualVersion = json.value("cache_version").toObject() - .value("major").toInt(); + auto actualVersion = json.value("cache_version"_ls).toObject() + .value("major"_ls).toInt(); if (actualVersion == requiredVersion) parseJson(json, cacheFileInfo.absolutePath() + '/'); else |