diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp index 97eff5c1e6b..41fa6df2924 100644 --- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp +++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp @@ -166,7 +166,7 @@ public: const bool reindent = true; const bool openEditor = false; const Utils::FilePath newFilePath = newFileName; - if (!refactoring.createFile(newFileName, newComponentSource, reindent, openEditor)) + if (!refactoring.file(newFileName)->create(newComponentSource, reindent, openEditor)) return; if (path.toString() == currentFileName.toFileInfo().path()) { diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index cfbfe58d3b5..cd0b12c080a 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -28,14 +28,6 @@ namespace TextEditor { RefactoringChanges::~RefactoringChanges() = default; -bool RefactoringChanges::createFile(const FilePath &filePath, - const QString &contents, - bool reindent, - bool openEditor) const -{ - return file(filePath)->create(contents, reindent, openEditor); -} - RefactoringFilePtr RefactoringChanges::file(const FilePath &filePath) const { return RefactoringFilePtr(new RefactoringFile(filePath)); diff --git a/src/plugins/texteditor/refactoringchanges.h b/src/plugins/texteditor/refactoringchanges.h index 107051f00a5..5168a58b8d3 100644 --- a/src/plugins/texteditor/refactoringchanges.h +++ b/src/plugins/texteditor/refactoringchanges.h @@ -118,11 +118,6 @@ public: // TODO: Make pure virtual and introduce dedicated subclass for generic refactoring, // so no one instantiates this one by mistake. virtual RefactoringFilePtr file(const Utils::FilePath &filePath) const; - - bool createFile(const Utils::FilePath &filePath, - const QString &contents, - bool reindent = true, - bool openEditor = true) const; }; } // namespace TextEditor