diff options
Diffstat (limited to 'src/Authoring/Studio/Application/StudioApp.cpp')
-rw-r--r-- | src/Authoring/Studio/Application/StudioApp.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Authoring/Studio/Application/StudioApp.cpp b/src/Authoring/Studio/Application/StudioApp.cpp index 8ce3d6c0..44127bdc 100644 --- a/src/Authoring/Studio/Application/StudioApp.cpp +++ b/src/Authoring/Studio/Application/StudioApp.cpp @@ -1791,13 +1791,17 @@ void CStudioApp::saveDataInputsToProjectFile() diNode.setAttribute(QStringLiteral("evaluator"), item->valueString); } #endif - // Let's allow storing key even if actual metadata is empty, as we - // do not know how the user code is going to interpret metadata contents. - if (!item->metaDataKey.isEmpty()) { - diNode.setAttribute(QStringLiteral("metadatakey"), item->metaDataKey); - if (!item->metaData.isEmpty()) - diNode.setAttribute(QStringLiteral("metadata"), item->metaData); + + QHashIterator<QString, QString> it(item->metadata); + QString metadataStr; + while (it.hasNext()) { + it.next(); + metadataStr.append(it.key() + QLatin1Char('$') + it.value() + QLatin1Char('$')); } + metadataStr.chop(1); + + diNode.setAttribute(QStringLiteral("metadata"), metadataStr.trimmed()); + assetsNode.appendChild(diNode); } StudioUtils::commitDomDocumentSave(file, doc); |