diff options
author | Bernhard Beschow <shentey@gmail.com> | 2017-10-22 22:17:49 +0200 |
---|---|---|
committer | Bernhard Beschow <shentey@gmail.com> | 2018-12-20 11:41:05 +0000 |
commit | 886c76e10fcf21ff78e976262fcf3a3fd12cebdb (patch) | |
tree | 67c91e06b58e793df7128b05c82e14c930f5a36a /src/plugins/cppeditor/cppeditorwidget.cpp | |
parent | e15beff0cbb5f8982064045ad5611fe7290f3f6a (diff) |
CppEditorWidget: Remove private refactoringEngine() method
d->m_modelManager can be used directly instead.
Change-Id: I11158ede3bb827ebed88706d0bfaab4e0f142f0a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppeditorwidget.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppeditorwidget.cpp | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index a7373557ed..dbd7a450f7 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> 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> 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(); |