TextEditor: Remove RefactoringChanges::m_data

There is no use for a data member in the base class.

Change-Id: I126d8713d2a7bf4061ecbd60b4c144d39c08d550
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-11-16 17:33:35 +01:00
parent 5d6fc1fc3b
commit 246a878a34
6 changed files with 9 additions and 27 deletions

View File

@@ -30,13 +30,13 @@ public:
QmlJSRefactoringChanges::QmlJSRefactoringChanges(ModelManagerInterface *modelManager,
const Snapshot &snapshot)
: RefactoringChanges(new QmlJSRefactoringChangesData(modelManager, snapshot))
: m_data(new QmlJSRefactoringChangesData(modelManager, snapshot))
{
}
TextEditor::RefactoringFilePtr QmlJSRefactoringChanges::file(const Utils::FilePath &filePath) const
{
return QmlJSRefactoringFilePtr(new QmlJSRefactoringFile(filePath, m_data.staticCast<QmlJSRefactoringChangesData>()));
return QmlJSRefactoringFilePtr(new QmlJSRefactoringFile(filePath, m_data));
}
QmlJSRefactoringFilePtr QmlJSRefactoringChanges::qmlJSFile(const Utils::FilePath &filePath) const
@@ -52,12 +52,7 @@ QmlJSRefactoringFilePtr QmlJSRefactoringChanges::file(
const Snapshot &QmlJSRefactoringChanges::snapshot() const
{
return data()->m_snapshot;
}
QmlJSRefactoringChangesData *QmlJSRefactoringChanges::data() const
{
return static_cast<QmlJSRefactoringChangesData *>(m_data.data());
return m_data->m_snapshot;
}
QmlJSRefactoringFile::QmlJSRefactoringFile(