forked from qt-creator/qt-creator
QmlDesigner: Import QtQuick3D on bundle import if missing
Fixes: QDS-13374 Change-Id: Ia038e3eb6e49808da93c5cf3de7088dc40781c2d Reviewed-by: Ali Kianian <ali.kianian@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -136,8 +136,16 @@ void BundleHelper::importBundleToProject()
|
|||||||
" of Qt Design Studio"));
|
" of Qt Design Studio"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString bundleId = importedJsonObj.value("id").toString();
|
QString bundleId = importedJsonObj.value("id").toString();
|
||||||
|
|
||||||
|
bool hasQuick3DImport = m_view->model()->hasImport("QtQuick3D");
|
||||||
|
|
||||||
|
if (!hasQuick3DImport) {
|
||||||
|
Import import = Import::createLibraryImport("QtQuick3D");
|
||||||
|
m_view->model()->changeImports({import}, {});
|
||||||
|
}
|
||||||
|
|
||||||
QTemporaryDir tempDir;
|
QTemporaryDir tempDir;
|
||||||
QTC_ASSERT(tempDir.isValid(), return);
|
QTC_ASSERT(tempDir.isValid(), return);
|
||||||
auto bundlePath = Utils::FilePath::fromString(tempDir.path());
|
auto bundlePath = Utils::FilePath::fromString(tempDir.path());
|
||||||
|
Reference in New Issue
Block a user