Commit 7313203c authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Reduce calls to recalculateSemanticInfo()

Case: Opening a file that is not yet in the Snapshot

recalculateSemanticInfoNow() emitted the same SemanticInfo until the
indexer processed the document (Snapshot::contains()). That signal
caused CppEditorWidget::updateSemanticInfo() to call
semanticRehighlight() because of unequal revisions. That triggered
recalculateSemanticInfo() again.

Change-Id: I8fb7d7c42aad3d6a89876e743cd4e3c7aff643bf
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent ed4b2027
......@@ -422,6 +422,8 @@ void CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &so
doc->control()->setTopLevelDeclarationProcessor(processor);
doc->check();
semanticInfo.doc = doc;
} else {
return;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment