TextEditors: Avoid sending contentsChanged signal when rehighlighting

That avoids a complete reparse of the document when font settings
change, but in turn now requires an explicit redo of semantic
highlighting in that case.
The cpp editor part of this patch is actually still doing semantic
parsing though. This will be fixed up in a later patch.

Change-Id: I6f51a18cba6325856c96e155700eb912f6d3aad5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Eike Ziller
2014-01-30 12:48:30 +01:00
parent d653d600e0
commit a94d736881
3 changed files with 5 additions and 2 deletions

View File

@@ -569,6 +569,10 @@ void QmlJSTextEditorWidget::applyFontSettings()
{
TextEditor::BaseTextEditorWidget::applyFontSettings();
m_semanticHighlighter->updateFontSettings(baseTextDocument()->fontSettings());
if (!m_qmlJsEditorDocument->isSemanticInfoOutdated()) {
m_semanticHighlighter->rerun(m_qmlJsEditorDocument->semanticInfo());
updateUses();
}
}