aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpprefactoringchanges.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-11-17 13:36:46 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2023-11-21 14:24:49 +0000
commit116798e54479bd040da96cf79d422528ca49a5a8 (patch)
treecb57005764802226442e63a56d4be4e232a0ed43 /src/plugins/cppeditor/cpprefactoringchanges.cpp
parent7e38745706a8c017a4d310af32ae0ca4c9150464 (diff)
CppEditor/QmlJSTools: Simplify RefactoringFile::file() re-implementation
Change-Id: I8f2af8de3786ecf4400bc42019d496bd52bb2545 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cpprefactoringchanges.cpp')
-rw-r--r--src/plugins/cppeditor/cpprefactoringchanges.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cpprefactoringchanges.cpp b/src/plugins/cppeditor/cpprefactoringchanges.cpp
index e15dca72cb..207d359cb8 100644
--- a/src/plugins/cppeditor/cpprefactoringchanges.cpp
+++ b/src/plugins/cppeditor/cpprefactoringchanges.cpp
@@ -60,12 +60,12 @@ CppRefactoringFilePtr CppRefactoringChanges::file(TextEditor::TextEditorWidget *
TextEditor::RefactoringFilePtr CppRefactoringChanges::file(const FilePath &filePath) const
{
- return TextEditor::RefactoringFilePtr(new CppRefactoringFile(filePath, m_data));
+ return cppFile(filePath);
}
CppRefactoringFilePtr CppRefactoringChanges::cppFile(const Utils::FilePath &filePath) const
{
- return file(filePath).staticCast<CppRefactoringFile>();
+ return CppRefactoringFilePtr(new CppRefactoringFile(filePath, m_data));
}
CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const FilePath &filePath) const