QmlDesigner: Import only mandatory libraries or directories

Only mandatory files are imported by the newly created component.
In the case that the import data is empty, All parent imports would be
included.

Task-number: QDS-9829
Change-Id: Ie96e2bc04a10e00b15ae12c5e58b5dc2392886ae
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Ali Kianian
2023-06-07 15:52:58 +03:00
parent e2f5b37fce
commit 86d4fbab79
15 changed files with 106 additions and 24 deletions

View File

@@ -15,6 +15,7 @@ QMLJSEDITOR_EXPORT void matchComponentFromObjectDefQuickFix(
QMLJSEDITOR_EXPORT void performComponentFromObjectDef(QmlJSEditorWidget *editor,
const QString &fileName,
QmlJS::AST::UiObjectDefinition *objDef);
QmlJS::AST::UiObjectDefinition *objDef,
const QString &importData);
} // namespace QmlJSEditor