From e15beff0cbb5f8982064045ad5611fe7290f3f6a Mon Sep 17 00:00:00 2001 From: Bernhard Beschow Date: Sun, 16 Dec 2018 15:31:28 +0100 Subject: [PATCH] CppEditorWidget: Reuse d->m_modelManager attribute d->m_modelManager is an alias to CppTools::CppModelManager::instance() and should be used for consistency's sake. Change-Id: I8fab163990ffb039db7900000d107c67f29a7e46 Reviewed-by: Orgad Shaneh Reviewed-by: Ivan Donchevskii --- src/plugins/cppeditor/cppeditorwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index e01a1a71c17..a7373557ed3 100644 --- a/src/plugins/cppeditor/cppeditorwidget.cpp +++ b/src/plugins/cppeditor/cppeditorwidget.cpp @@ -775,12 +775,12 @@ RefactorMarkers CppEditorWidget::refactorMarkersWithoutClangMarkers() const RefactoringEngineInterface &CppEditorWidget::refactoringEngine() const { - return *CppTools::CppModelManager::instance(); + return *d->m_modelManager; } CppTools::FollowSymbolInterface &CppEditorWidget::followSymbolInterface() const { - return CppTools::CppModelManager::instance()->followSymbolInterface(); + return d->m_modelManager->followSymbolInterface(); } bool CppEditorWidget::isSemanticInfoValidExceptLocalUses() const @@ -1092,7 +1092,7 @@ void CppEditorWidget::updateFunctionDeclDefLinkNow() if (!isSemanticInfoValidExceptLocalUses()) return; - Snapshot snapshot = CppModelManager::instance()->snapshot(); + Snapshot snapshot = d->m_modelManager->snapshot(); snapshot.insert(semanticDoc); d->m_declDefLinkFinder->startFindLinkAt(textCursor(), semanticDoc, snapshot);