diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index a7373557ed3..dbd7a450f7e 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -441,12 +441,12 @@ void CppEditorWidget::findUsages(QTextCursor cursor) // 'this' in cursorInEditor is never used (and must never be used) asynchronously. const CppTools::CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this}; QPointer cppEditorWidget = this; - refactoringEngine().findUsages(cursorInEditor, - [=](const CppTools::Usages &usages) { - if (!cppEditorWidget) - return; - findRenameCallback(cppEditorWidget.data(), cursor, usages); - }); + d->m_modelManager->findUsages(cursorInEditor, + [=](const CppTools::Usages &usages) { + if (!cppEditorWidget) + return; + findRenameCallback(cppEditorWidget.data(), cursor, usages); + }); } void CppEditorWidget::renameUsages(const QString &replacement, QTextCursor cursor) @@ -455,14 +455,14 @@ void CppEditorWidget::renameUsages(const QString &replacement, QTextCursor curso cursor = textCursor(); CppTools::CursorInEditor cursorInEditor{cursor, textDocument()->filePath(), this}; QPointer cppEditorWidget = this; - refactoringEngine().globalRename(cursorInEditor, - [=](const CppTools::Usages &usages) { - if (!cppEditorWidget) - return; - findRenameCallback(cppEditorWidget.data(), cursor, usages, - true, replacement); - }, - replacement); + d->m_modelManager->globalRename(cursorInEditor, + [=](const CppTools::Usages &usages) { + if (!cppEditorWidget) + return; + findRenameCallback(cppEditorWidget.data(), cursor, usages, + true, replacement); + }, + replacement); } bool CppEditorWidget::selectBlockUp() @@ -641,11 +641,11 @@ void CppEditorWidget::renameSymbolUnderCursor() }; viewport()->setCursor(Qt::BusyCursor); - refactoringEngine().startLocalRenaming(CppTools::CursorInEditor{textCursor(), - textDocument()->filePath(), - this}, - projPart, - std::move(renameSymbols)); + d->m_modelManager->startLocalRenaming(CppTools::CursorInEditor{textCursor(), + textDocument()->filePath(), + this}, + projPart, + std::move(renameSymbols)); } void CppEditorWidget::updatePreprocessorButtonTooltip() @@ -773,11 +773,6 @@ RefactorMarkers CppEditorWidget::refactorMarkersWithoutClangMarkers() const return clearedRefactorMarkers; } -RefactoringEngineInterface &CppEditorWidget::refactoringEngine() const -{ - return *d->m_modelManager; -} - CppTools::FollowSymbolInterface &CppEditorWidget::followSymbolInterface() const { return d->m_modelManager->followSymbolInterface(); diff --git a/src/plugins/cppeditor/cppeditorwidget.h b/src/plugins/cppeditor/cppeditorwidget.h index e00f5666c78..f141ee22485 100644 --- a/src/plugins/cppeditor/cppeditorwidget.h +++ b/src/plugins/cppeditor/cppeditorwidget.h @@ -33,7 +33,6 @@ namespace CppTools { class CppEditorOutline; -class RefactoringEngineInterface; class FollowSymbolInterface; class SemanticInfo; class ProjectPart; @@ -142,7 +141,6 @@ private: TextEditor::RefactorMarkers refactorMarkersWithoutClangMarkers() const; CppTools::FollowSymbolInterface &followSymbolInterface() const; - CppTools::RefactoringEngineInterface &refactoringEngine() const; CppTools::ProjectPart *projectPart() const;