Commit 1f0fd959 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

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: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 823fafc1
......@@ -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();
......
......@@ -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);
}
}
......
Supports Markdown
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