Add common interface for text formats inside syntax highlighter

Change-Id: I87f64446161a57aea0896f68e4eafacef791969b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
jkobus
2013-08-13 12:57:31 +02:00
committed by Jarek Kobus
parent 760aa0f8bc
commit e8801167aa
69 changed files with 489 additions and 531 deletions

View File

@@ -980,12 +980,6 @@ void QmlJSTextEditorWidget::updateFileName()
void QmlJSTextEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
{
TextEditor::BaseTextEditorWidget::setFontSettings(fs);
Highlighter *highlighter = qobject_cast<Highlighter*>(baseTextDocument()->syntaxHighlighter());
if (!highlighter)
return;
highlighter->setFormats(fs.toTextCharFormats(highlighterFormatCategories()));
highlighter->rehighlight();
m_occurrencesFormat = fs.toTextCharFormat(TextEditor::C_OCCURRENCES);
m_occurrencesUnusedFormat = fs.toTextCharFormat(TextEditor::C_OCCURRENCES_UNUSED);