From b27ef93df9b5147ab03c8a255918874b9f73c201 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 10 Nov 2020 13:07:28 +0100 Subject: 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. --- lib/events/roommemberevent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/events/roommemberevent.cpp') 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 { if (membershipString == *it) return MembershipType(it - membershipStrings.begin()); - qCWarning(EVENTS) << "Unknown MembershipType: " << membershipString; + if (!membershipString.isEmpty()) + qCWarning(EVENTS) << "Unknown MembershipType: " << membershipString; return MembershipType::Undefined; } }; -- cgit v1.2.3