TextEditor: Make RefactoringChanges::file() virtual

More preparation for de-virtualization of RefactoringChangesData.

Change-Id: Ib5f7782a8dcaa2ae093b62aebedbd7bae9d4c3f1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2023-11-16 15:45:02 +01:00
parent 156569fcc7
commit 413a6a6fde
11 changed files with 81 additions and 63 deletions

View File

@@ -50,12 +50,17 @@ CppRefactoringFilePtr CppRefactoringChanges::file(TextEditor::TextEditorWidget *
return result;
}
CppRefactoringFilePtr CppRefactoringChanges::file(const FilePath &filePath) const
TextEditor::RefactoringFilePtr CppRefactoringChanges::file(const FilePath &filePath) const
{
CppRefactoringFilePtr result(new CppRefactoringFile(filePath, m_data));
return result;
}
CppRefactoringFilePtr CppRefactoringChanges::cppFile(const Utils::FilePath &filePath) const
{
return file(filePath).staticCast<CppRefactoringFile>();
}
CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const FilePath &filePath) const
{
QTextDocument *document = nullptr;