diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-11-10 13:07:28 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-11-10 13:07:28 +0100 |
commit | b27ef93df9b5147ab03c8a255918874b9f73c201 (patch) | |
tree | dd19317119aa97223aa22a6f695ffdd34c4d0b29 /lib/events/roommemberevent.cpp | |
parent | 538e02f92bd5ccaf4f4870deb8de1a4b93b4ee0a (diff) | |
download | libquotient-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.cpp | 3 |
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; } }; |