aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools/qmljsmodelmanager.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-02-15 23:13:28 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-02-17 10:11:29 +0000
commit831fb6181e592002f5c97c324991799e6e2337ef (patch)
tree4b516169a0ca968ec508df136a94bf31da78c29e /src/plugins/qmljstools/qmljsmodelmanager.cpp
parenta22dc36aaf612735d09a51d4fb5865fc64297d02 (diff)
CppTools: Remove assertions for CppModelManager::instance()
It cannot return null. Change-Id: I3ac5f33e7e02554edc8df067c7b85518e58c1fc2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmljstools/qmljsmodelmanager.cpp')
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index 8fc7fb4796d..3c37317fb11 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -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);