forked from qt-creator/qt-creator
CppTools: Remove assertions for CppModelManager::instance()
It cannot return null. Change-Id: I3ac5f33e7e02554edc8df067c7b85518e58c1fc2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
a22dc36aaf
commit
831fb6181e
@@ -214,14 +214,11 @@ ModelManager::~ModelManager()
|
||||
|
||||
void ModelManager::delayedInitialization()
|
||||
{
|
||||
CppTools::CppModelManager *cppModelManager =
|
||||
CppTools::CppModelManager::instance();
|
||||
if (cppModelManager) {
|
||||
// It's important to have a direct connection here so we can prevent
|
||||
// the source and AST of the cpp document being cleaned away.
|
||||
connect(cppModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
|
||||
this, SLOT(maybeQueueCppQmlTypeUpdate(CPlusPlus::Document::Ptr)), Qt::DirectConnection);
|
||||
}
|
||||
CppTools::CppModelManager *cppModelManager = CppTools::CppModelManager::instance();
|
||||
// It's important to have a direct connection here so we can prevent
|
||||
// the source and AST of the cpp document being cleaned away.
|
||||
connect(cppModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
|
||||
this, SLOT(maybeQueueCppQmlTypeUpdate(CPlusPlus::Document::Ptr)), Qt::DirectConnection);
|
||||
|
||||
connect(ProjectExplorer::SessionManager::instance(), &ProjectExplorer::SessionManager::projectRemoved,
|
||||
this, &ModelManager::removeProjectInfo);
|
||||
|
||||
Reference in New Issue
Block a user