forked from qt-creator/qt-creator
QmlDesigner: Give a default name if node id is empty
...when exporting a component as bundle Change-Id: If51cf35df63abddf93db52fa580fdf624e26fda4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
This commit is contained in:
@@ -884,7 +884,8 @@ void ContentLibraryView::addLib3DItem(const ModelNode &node)
|
||||
|
||||
QString ContentLibraryView::getExportPath(const ModelNode &node) const
|
||||
{
|
||||
QString defaultExportFileName = QLatin1String("%1.%2").arg(node.id(), Constants::BUNDLE_SUFFIX);
|
||||
QString defaultFileName = node.hasId() ? node.id() : "component";
|
||||
QString defaultExportFileName = QLatin1String("%1.%2").arg(defaultFileName, Constants::BUNDLE_SUFFIX);
|
||||
Utils::FilePath projectFP = DocumentManager::currentProjectDirPath();
|
||||
if (projectFP.isEmpty()) {
|
||||
projectFP = QmlDesignerPlugin::instance()->documentManager()
|
||||
|
Reference in New Issue
Block a user