forked from qt-creator/qt-creator
AssetExport: Notify parser failure
Change-Id: I76ed8b423c91b4ba3d5287153016ea6f1a820c8a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include "componentexporter.h"
|
#include "componentexporter.h"
|
||||||
#include "assetexporter.h"
|
#include "assetexporter.h"
|
||||||
#include "assetexportpluginconstants.h"
|
#include "assetexportpluginconstants.h"
|
||||||
|
#include "exportnotification.h"
|
||||||
#include "parsers/modelnodeparser.h"
|
#include "parsers/modelnodeparser.h"
|
||||||
|
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
@@ -113,6 +114,9 @@ QJsonObject Component::nodeToJson(const ModelNode &node)
|
|||||||
node.model()->rewriterView()->writeAuxiliaryData();
|
node.model()->rewriterView()->writeAuxiliaryData();
|
||||||
}
|
}
|
||||||
jsonObject = parser->json(*this);
|
jsonObject = parser->json(*this);
|
||||||
|
} else {
|
||||||
|
ExportNotification::addError(tr("Error exporting component %1. Parser unavailable.")
|
||||||
|
.arg(node.id()));
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonArray children;
|
QJsonArray children;
|
||||||
|
@@ -24,8 +24,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QJsonObject>
|
|
||||||
#include <QByteArrayList>
|
#include <QByteArrayList>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -67,6 +68,8 @@ protected:
|
|||||||
|
|
||||||
class Component
|
class Component
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Component);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Component(AssetExporter& exporter, const ModelNode &rootNode);
|
Component(AssetExporter& exporter, const ModelNode &rootNode);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user