diff options
author | Black Hat <bhat@encom.eu.org> | 2019-12-29 21:42:10 +0800 |
---|---|---|
committer | Black Hat <bhat@encom.eu.org> | 2019-12-29 21:42:10 +0800 |
commit | 7d55e22ee3465e75e5ac7750bb1d205eb555761d (patch) | |
tree | 36f7fcef622c44aca8d46514395126280111ed8a /lib/syncdata.cpp | |
parent | e0c01b6fee5027211bd44a39860e40a2b7b226ad (diff) | |
parent | 16d6700950f5f0ebd71481efd5e1a24f04e3c651 (diff) | |
download | libquotient-7d55e22ee3465e75e5ac7750bb1d205eb555761d.tar.gz libquotient-7d55e22ee3465e75e5ac7750bb1d205eb555761d.zip |
Merge branch 'master' of https://github.com/quotient-im/libQuotient into bhat-powerlevel
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r-- | lib/syncdata.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index 5b47b30f..89c512a2 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -30,8 +30,7 @@ const QString SyncRoomData::UnreadCountKey = bool RoomSummary::isEmpty() const { - return joinedMemberCount.omitted() && invitedMemberCount.omitted() - && heroes.omitted(); + return !joinedMemberCount && !invitedMemberCount && !heroes; } bool RoomSummary::merge(const RoomSummary& other) @@ -46,12 +45,12 @@ QDebug Quotient::operator<<(QDebug dbg, const RoomSummary& rs) { QDebugStateSaver _(dbg); QStringList sl; - if (!rs.joinedMemberCount.omitted()) - sl << QStringLiteral("joined: %1").arg(rs.joinedMemberCount.value()); - if (!rs.invitedMemberCount.omitted()) - sl << QStringLiteral("invited: %1").arg(rs.invitedMemberCount.value()); - if (!rs.heroes.omitted()) - sl << QStringLiteral("heroes: [%1]").arg(rs.heroes.value().join(',')); + if (rs.joinedMemberCount) + sl << QStringLiteral("joined: %1").arg(*rs.joinedMemberCount); + if (rs.invitedMemberCount) + sl << QStringLiteral("invited: %1").arg(*rs.invitedMemberCount); + if (rs.heroes) + sl << QStringLiteral("heroes: [%1]").arg(rs.heroes->join(',')); dbg.nospace().noquote() << sl.join(QStringLiteral("; ")); return dbg; } |