forked from qt-creator/qt-creator
AssetExport: Export custom id
Task-number: QDS-4114 Change-Id: I013ff674f0e9f59ed0a82803114faffae28bd74a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -54,6 +54,7 @@ const char HeightTag[] = "height";
|
||||
|
||||
const char MetadataTag[] = "metadata";
|
||||
const char ChildrenTag[] = "children";
|
||||
const char CustomIdTag[] = "customId";
|
||||
const char QmlIdTag[] = "qmlId";
|
||||
const char ExportTypeTag[] = "exportType";
|
||||
const char ExportTypeComponent[] = "component";
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "componentexporter.h"
|
||||
|
||||
#include "qmlitemnode.h"
|
||||
#include "annotation.h"
|
||||
|
||||
namespace {
|
||||
static QString capitalize(const QString &str)
|
||||
@@ -85,6 +86,9 @@ QJsonObject QmlDesigner::ItemNodeDumper::json(QmlDesigner::Component &component)
|
||||
metadata.insert(ExportTypeTag, ExportTypeChild);
|
||||
metadata.insert(TypeNameTag, QString::fromLatin1(m_node.type()));
|
||||
|
||||
if (m_node.hasCustomId())
|
||||
metadata.insert(CustomIdTag, m_node.customId());
|
||||
|
||||
QString typeId = component.exporter().componentUuid(m_node);
|
||||
if (!typeId.isEmpty())
|
||||
metadata.insert(TypeIdTag, typeId);
|
||||
|
Reference in New Issue
Block a user