Merge remote-tracking branch 'origin/qds/dev'

Conflicts: src/libs/utils/filepath.cpp
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp
  tests/unit/unittest/CMakeLists.txt

Change-Id: I017a6075db41a5233487ac855ffe23de2b2bb0ee
This commit is contained in:
Tim Jenssen
2023-03-30 13:34:12 +02:00
858 changed files with 30485 additions and 12280 deletions

View File

@@ -246,13 +246,16 @@ void matchComponentFromObjectDefQuickFix(const QmlJSQuickFixAssistInterface *int
}
}
void performComponentFromObjectDef(const QString &fileName, QmlJS::AST::UiObjectDefinition *objDef)
void performComponentFromObjectDef(QmlJSEditorWidget *editor,
const QString &fileName,
QmlJS::AST::UiObjectDefinition *objDef)
{
QmlJSRefactoringChanges refactoring(QmlJS::ModelManagerInterface::instance(),
QmlJS::ModelManagerInterface::instance()->snapshot());
QmlJSRefactoringFilePtr current = refactoring.file(Utils::FilePath::fromString(fileName));
Operation operation(nullptr, objDef);
QmlJSQuickFixAssistInterface interface(editor, TextEditor::AssistReason::ExplicitlyInvoked);
Operation operation(&interface, objDef);
operation.performChanges(current, refactoring);
}

View File

@@ -8,10 +8,13 @@
namespace QmlJSEditor {
class QmlJSEditorWidget;
QMLJSEDITOR_EXPORT void matchComponentFromObjectDefQuickFix(
const Internal::QmlJSQuickFixAssistInterface *interface, QuickFixOperations &result);
QMLJSEDITOR_EXPORT void performComponentFromObjectDef
(const QString &fileName, QmlJS::AST::UiObjectDefinition *objDef);
QMLJSEDITOR_EXPORT void performComponentFromObjectDef(QmlJSEditorWidget *editor,
const QString &fileName,
QmlJS::AST::UiObjectDefinition *objDef);
} // namespace QmlJSEditor