diff options
author | Bernhard Beschow <shentey@gmail.com> | 2018-12-16 15:31:28 +0100 |
---|---|---|
committer | Bernhard Beschow <shentey@gmail.com> | 2018-12-20 11:40:28 +0000 |
commit | e15beff0cbb5f8982064045ad5611fe7290f3f6a (patch) | |
tree | fc7a1728dfe547cc769344318467c9798e45b5dc /src/plugins/cppeditor/cppeditorwidget.cpp | |
parent | 365123ea2c8df09ac970dc34a35c6f3e0024326c (diff) |
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 <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppeditorwidget.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppeditorwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/cppeditorwidget.cpp b/src/plugins/cppeditor/cppeditorwidget.cpp index e01a1a71c1..a7373557ed 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); |