forked from qt-creator/qt-creator
QmlDesigner: Fix project storage build
Change-Id: Ifdfefa6a9dc84c95b8fc9c9a06490325bb3584f9 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -48,7 +48,10 @@ void BundleHelper::createImporter()
|
||||
m_importer = Utils::makeUniqueObjectPtr<BundleImporter>();
|
||||
|
||||
#ifdef QDS_USE_PROJECTSTORAGE
|
||||
QObject::connect(m_importer, &BundleImporter::importFinished, m_widget,
|
||||
QObject::connect(
|
||||
m_importer.get(),
|
||||
&BundleImporter::importFinished,
|
||||
m_widget,
|
||||
[&](const QmlDesigner::TypeName &typeName, const QString &bundleId) {
|
||||
QTC_ASSERT(typeName.size(), return);
|
||||
if (isMaterialBundle(bundleId)) {
|
||||
|
@@ -256,7 +256,7 @@ void applyMaterialToModels(AbstractView *view, const ModelNode &material,
|
||||
#ifdef QDS_USE_PROJECTSTORAGE
|
||||
ModelNode createMaterial(AbstractView *view, const TypeName &typeName)
|
||||
{
|
||||
ModelNode matLib = Utils3D::materialLibraryNode(this);
|
||||
ModelNode matLib = Utils3D::materialLibraryNode(view);
|
||||
if (!matLib.isValid() || !typeName.size())
|
||||
return {};
|
||||
|
||||
|
@@ -805,7 +805,7 @@ void Edit3DWidget::dropEvent(QDropEvent *dropEvent)
|
||||
auto moduleId = model->module(import3dTypePrefix, Storage::ModuleKind::QmlLibrary);
|
||||
auto metaInfo = model->metaInfo(moduleId, fileName.toUtf8());
|
||||
if (auto entries = metaInfo.itemLibrariesEntries(); entries.size()) {
|
||||
auto entry = ItemLibraryEntry{entries.front()};
|
||||
auto entry = ItemLibraryEntry::create(entries.front());
|
||||
QmlVisualNode::createQml3DNode(view(), entry, m_canvas->activeScene(), {}, false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user