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-15 14:27:46 +0100 |
commit | 6e8be18d1587af3dc82526e32fb12d3a895908f2 (patch) | |
tree | 8402121537019f64edab4201458d84b1be86cd94 /lib/events/roommemberevent.cpp | |
parent | e81117fbd97f9ea077d377c89fdabd19726b3fbf (diff) | |
download | libquotient-6e8be18d1587af3dc82526e32fb12d3a895908f2.tar.gz libquotient-6e8be18d1587af3dc82526e32fb12d3a895908f2.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 35cbdb3a..3193a54d 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; } }; |