From c934384622b0e50c27ac5d1d30ec44a59a531f8c Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sun, 3 Apr 2016 20:55:00 +0100 Subject: [PATCH] refs #626 Empty type name indicates an empty variant, no warning in this case. --- src/blackmisc/variant.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blackmisc/variant.cpp b/src/blackmisc/variant.cpp index bf512cccf..dc223544b 100644 --- a/src/blackmisc/variant.cpp +++ b/src/blackmisc/variant.cpp @@ -142,6 +142,7 @@ namespace BlackMisc // Remark: Names "type" and "value" are also used for drag and drop // Changing the names here requires the change for drag and drop too QString typeName = json.value("type").toString(); + if (typeName.isEmpty()) { m_v.clear(); return; } int typeId = QMetaType::type(qPrintable(typeName)); switch (typeId)