forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -60,12 +60,12 @@ CppRefactoringFilePtr CppRefactoringChanges::file(TextEditor::TextEditorWidget *
|
|||||||
|
|
||||||
TextEditor::RefactoringFilePtr CppRefactoringChanges::file(const FilePath &filePath) const
|
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
|
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
|
CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const FilePath &filePath) const
|
||||||
|
|||||||
@@ -36,12 +36,12 @@ QmlJSRefactoringChanges::QmlJSRefactoringChanges(ModelManagerInterface *modelMan
|
|||||||
|
|
||||||
TextEditor::RefactoringFilePtr QmlJSRefactoringChanges::file(const Utils::FilePath &filePath) const
|
TextEditor::RefactoringFilePtr QmlJSRefactoringChanges::file(const Utils::FilePath &filePath) const
|
||||||
{
|
{
|
||||||
return QmlJSRefactoringFilePtr(new QmlJSRefactoringFile(filePath, m_data));
|
return qmlJSFile(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJSRefactoringFilePtr QmlJSRefactoringChanges::qmlJSFile(const Utils::FilePath &filePath) const
|
QmlJSRefactoringFilePtr QmlJSRefactoringChanges::qmlJSFile(const Utils::FilePath &filePath) const
|
||||||
{
|
{
|
||||||
return file(filePath).staticCast<QmlJSRefactoringFile>();
|
return QmlJSRefactoringFilePtr(new QmlJSRefactoringFile(filePath, m_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJSRefactoringFilePtr QmlJSRefactoringChanges::file(
|
QmlJSRefactoringFilePtr QmlJSRefactoringChanges::file(
|
||||||
|
|||||||
Reference in New Issue
Block a user