aboutsummaryrefslogtreecommitdiff
path: root/lib/syncdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r--lib/syncdata.cpp15
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;
}