Commit 15a7f62a authored by Volker Krause's avatar Volker Krause
Browse files

Consider empty variant lists as semantically null as well

This avoids dropping potential action lists during merging if only one
side has one.

This still needs a more comprehensive solution to deal with both sides
having different action lists though.
parent 2b1bd70b
......@@ -359,6 +359,9 @@ bool JsonLd::valueIsNull(const QVariant &v)
if (v.type() == qMetaTypeId<float>()) {
return std::isnan(v.toFloat());
}
if (v.type() == QVariant::List) {
return v.toList().isEmpty();
}
// starting with Qt6, QVariant::isNull is "shallow" and would miss the following as well
if (v.type() == QVariant::String) {
return v.toString().isNull();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment