CppEditor: Do not cancel highlighter on user interaction

e.g. changing cursor position or editing text.

CPPEditorWidget::updateUses() does not depend on the highlighter, but
only on the semantic info update.

Task-number: QTCREATORBUG-11367
Change-Id: Ia9f5ed7c2adc6899995a5d966a20e45b2f87d9e3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-03-04 09:45:41 -03:00
parent 823fafc17e
commit 1f0fd959fa
2 changed files with 2 additions and 6 deletions

View File

@@ -1158,11 +1158,6 @@ void CPPEditorWidget::updateOutlineToolTip()
void CPPEditorWidget::updateUses()
{
if (m_highlightWatcher) {
m_highlightWatcher->cancel();
m_highlightWatcher.reset();
}
// Block premature semantic info calculation when editor is created.
if (m_modelManager && m_modelManager->cppEditorSupport(editor())->initialized())
m_updateUsesTimer->start();

View File

@@ -391,10 +391,11 @@ void CppEditorSupport::startHighlighting()
if (m_lastHighlightRevision == revision)
return;
m_lastHighlightRevision = revision;
m_highlighter.cancel();
static const Document::Ptr dummyDoc;
static const Snapshot dummySnapshot;
m_highlighter = m_highlightingSupport->highlightingFuture(dummyDoc, dummySnapshot);
m_lastHighlightRevision = revision;
emit highlighterStarted(&m_highlighter, m_lastHighlightRevision);
}
}