aboutsummaryrefslogtreecommitdiff
path: root/lib/syncdata.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-04 21:27:38 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-04 21:27:38 +0900
commit1c5696e8f5a9ef87a065e2496eecf178e41e75a7 (patch)
tree8b41686c2e599054666868479589ef0df3a375a2 /lib/syncdata.cpp
parent7508887564935f70b086ed6fe79bd86757d1fc38 (diff)
downloadlibquotient-1c5696e8f5a9ef87a065e2496eecf178e41e75a7.tar.gz
libquotient-1c5696e8f5a9ef87a065e2496eecf178e41e75a7.zip
Clean up on clang-tidy/clazy analysis
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r--lib/syncdata.cpp8
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