aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommemberevent.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-10 13:07:28 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-10 13:07:28 +0100
commitb27ef93df9b5147ab03c8a255918874b9f73c201 (patch)
treedd19317119aa97223aa22a6f695ffdd34c4d0b29 /lib/events/roommemberevent.cpp
parent538e02f92bd5ccaf4f4870deb8de1a4b93b4ee0a (diff)
downloadlibquotient-b27ef93df9b5147ab03c8a255918874b9f73c201.tar.gz
libquotient-b27ef93df9b5147ab03c8a255918874b9f73c201.zip
MembershipType: drop warning on empty values
This is a usual situation when a membership type is undefined; and the current code constructs _a lot_ of stub events by loading them from empty JSON. So just silence those warnings for now.
Diffstat (limited to 'lib/events/roommemberevent.cpp')
-rw-r--r--lib/events/roommemberevent.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp
index f6b29f7f..be47e412 100644
--- a/lib/events/roommemberevent.cpp
+++ b/lib/events/roommemberevent.cpp
@@ -39,7 +39,8 @@ struct JsonConverter<MembershipType> {
if (membershipString == *it)
return MembershipType(it - membershipStrings.begin());
- qCWarning(EVENTS) << "Unknown MembershipType: " << membershipString;
+ if (!membershipString.isEmpty())
+ qCWarning(EVENTS) << "Unknown MembershipType: " << membershipString;
return MembershipType::Undefined;
}
};