forked from qt-creator/qt-creator
QmlDesigner: Set null value for the empty properties of json objects
Fixes: QDS-12211 Change-Id: I0b85c6fb2f059317ab412f083e2130e8c1cfb6b6 Reviewed-by: Shrief Gabr <shrief.gabr@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -643,7 +643,9 @@ QString CollectionDetails::toJson() const
|
||||
QJsonObject exportedElement;
|
||||
for (int i = 0; i < valueCount; ++i) {
|
||||
const QJsonValue &value = record.at(i);
|
||||
if (!isEmptyJsonValue(value))
|
||||
if (isEmptyJsonValue(value))
|
||||
exportedElement.insert(d->properties.at(i).name, QJsonValue::Null);
|
||||
else
|
||||
exportedElement.insert(d->properties.at(i).name, value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user