QmlDesigner: Ignore certain auxiliary data names when saving

Properties with the postfix '@internal' are not stored in the
QML file. Therefore they are not persistent.

Change-Id: I1f726c029f9db8c00bc85dc11c276c098e9a2a3a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2018-11-02 14:30:19 +01:00
parent fb25bd53c1
commit 6e7ecdb4f1

View File

@@ -493,6 +493,9 @@ QString RewriterView::auxiliaryDataAsQML() const
if (key.endsWith("@NodeInstance")) if (key.endsWith("@NodeInstance"))
continue; continue;
if (key.endsWith("@Internal"))
continue;
const QVariant value = data.value(key.toUtf8()); const QVariant value = data.value(key.toUtf8());
QString strValue = value.toString(); QString strValue = value.toString();
if (static_cast<QMetaType::Type>(value.type()) == QMetaType::QString) if (static_cast<QMetaType::Type>(value.type()) == QMetaType::QString)