TextEditor: filepathify RefactoringChanges

Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-05-28 12:02:36 +02:00
parent 15e4649fe8
commit 79b9a2fea6
21 changed files with 238 additions and 195 deletions

View File

@@ -187,7 +187,8 @@ public:
// stop if we can't create the new file
const bool reindent = true;
const bool openEditor = false;
if (!refactoring.createFile(newFileName, newComponentSource, reindent, openEditor))
const Utils::FilePath newFilePath = Utils::FilePath::fromString(newFileName);
if (!refactoring.createFile(newFilePath, newComponentSource, reindent, openEditor))
return;
if (path == QFileInfo(currentFileName).path()) {
@@ -264,7 +265,7 @@ void performComponentFromObjectDef(const QString &fileName, QmlJS::AST::UiObject
{
QmlJSRefactoringChanges refactoring(QmlJS::ModelManagerInterface::instance(),
QmlJS::ModelManagerInterface::instance()->snapshot());
QmlJSRefactoringFilePtr current = refactoring.file(fileName);
QmlJSRefactoringFilePtr current = refactoring.file(Utils::FilePath::fromString(fileName));
QmlJSQuickFixInterface interface;
Operation operation(interface, objDef);