forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -775,12 +775,12 @@ RefactorMarkers CppEditorWidget::refactorMarkersWithoutClangMarkers() const
|
|||||||
|
|
||||||
RefactoringEngineInterface &CppEditorWidget::refactoringEngine() const
|
RefactoringEngineInterface &CppEditorWidget::refactoringEngine() const
|
||||||
{
|
{
|
||||||
return *CppTools::CppModelManager::instance();
|
return *d->m_modelManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
CppTools::FollowSymbolInterface &CppEditorWidget::followSymbolInterface() const
|
CppTools::FollowSymbolInterface &CppEditorWidget::followSymbolInterface() const
|
||||||
{
|
{
|
||||||
return CppTools::CppModelManager::instance()->followSymbolInterface();
|
return d->m_modelManager->followSymbolInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CppEditorWidget::isSemanticInfoValidExceptLocalUses() const
|
bool CppEditorWidget::isSemanticInfoValidExceptLocalUses() const
|
||||||
@@ -1092,7 +1092,7 @@ void CppEditorWidget::updateFunctionDeclDefLinkNow()
|
|||||||
if (!isSemanticInfoValidExceptLocalUses())
|
if (!isSemanticInfoValidExceptLocalUses())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Snapshot snapshot = CppModelManager::instance()->snapshot();
|
Snapshot snapshot = d->m_modelManager->snapshot();
|
||||||
snapshot.insert(semanticDoc);
|
snapshot.insert(semanticDoc);
|
||||||
|
|
||||||
d->m_declDefLinkFinder->startFindLinkAt(textCursor(), semanticDoc, snapshot);
|
d->m_declDefLinkFinder->startFindLinkAt(textCursor(), semanticDoc, snapshot);
|
||||||
|
|||||||
Reference in New Issue
Block a user