Commit 5ae67214 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJSEditor: Don't trigger a reparse when dependencies change.

A semantic rehighlight suffices. This should avoid some parsing cycles
introduced earlier.

Reviewed-by: Roberto Raggi
parent 9cbafa96
......@@ -635,6 +635,11 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) :
connect(m_updateUsesTimer, SIGNAL(timeout()), this, SLOT(updateUsesNow()));
m_semanticRehighlightTimer = new QTimer(this);
connect(m_semanticRehighlightTimer, SIGNAL(timeout()), this, SLOT(semanticRehighlight()));
connect(this, SIGNAL(textChanged()), this, SLOT(updateDocument()));
connect(this, SIGNAL(textChanged()), this, SLOT(updateUses()));
......@@ -753,7 +758,7 @@ void QmlJSTextEditor::onDocumentUpdated(QmlJS::Document::Ptr doc)
|| doc->documentRevision() != document()->revision()) {
// didn't get the currently open, or an up to date document.
// trigger a semantic rehighlight anyway, after a time
......@@ -260,6 +260,7 @@ private:
QTimer *m_updateDocumentTimer;
QTimer *m_updateUsesTimer;
QTimer *m_semanticRehighlightTimer;
QComboBox *m_methodCombo;
ModelManagerInterface *m_modelManager;
QTextCharFormat m_occurrencesFormat;
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