CppEditor: Avoid premature calls to recalculateSemanticInfoNow

Now recalculateSemanticInfoNow is called only once instead of three
times when a new editor is opened/created.

Change-Id: Ife84fc9ca90cdbf2a417123e6a2b9e1e068dfdc4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-05-06 14:59:15 +02:00
parent 7313203c29
commit cacd66195c
3 changed files with 21 additions and 3 deletions

View File

@@ -1132,7 +1132,10 @@ void CPPEditorWidget::updateUses()
{
if (editorRevision() != m_highlightRevision)
m_highlighter.cancel();
m_updateUsesTimer->start();
// Block premature semantic info calculation when editor is created.
if (m_modelManager->cppEditorSupport(editor())->initialized())
m_updateUsesTimer->start();
}
void CPPEditorWidget::updateUsesNow()