Commit aee9a55a authored by Christian Kamm's avatar Christian Kamm Committed by hjk

QmlJS: Fix missing rehighlight if other file changes.

When QML modules with many source files were loaded, the
rehighlight from the found library was done before the files
contained in the library were done parsing.

This way any updated document will eventually lead to the
current editor rehighlighting.

Reviewed-by: Erik Verbruggen
Change-Id: I0f4d18390d3e0ee17cd255c68496f61479f82f05x
Reviewed-on: default avatarQt Sanity Bot <>
Reviewed-by: default avatarhjk <>
parent 918a1653
......@@ -635,7 +635,7 @@ QmlJSTextEditorWidget::QmlJSTextEditorWidget(QWidget *parent) :
m_semanticRehighlightTimer = new QTimer(this);
connect(m_semanticRehighlightTimer, SIGNAL(timeout()), this, SLOT(forceSemanticRehighlight()));
connect(m_semanticRehighlightTimer, SIGNAL(timeout()), this, SLOT(forceSemanticRehighlightIfCurrentEditor()));
connect(this, SIGNAL(textChanged()), this, SLOT(updateDocument()));
......@@ -808,6 +808,9 @@ void QmlJSTextEditorWidget::onDocumentUpdated(QmlJS::Document::Ptr doc)
if (file()->fileName() != doc->fileName()
|| doc->editorRevision() != document()->revision()) {
// maybe a dependency changed: schedule a potential rehighlight
// will not rehighlight if the current editor changes away from this file
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