forked from qt-creator/qt-creator
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:
@@ -34,7 +34,6 @@
|
||||
#include "qmljseditorconstants.h"
|
||||
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/snippets/snippeteditor.h>
|
||||
|
||||
@@ -65,10 +64,7 @@ QString QmlJSSnippetProvider::displayName() const
|
||||
|
||||
void QmlJSSnippetProvider::decorateEditor(TextEditor::SnippetEditorWidget *editor) const
|
||||
{
|
||||
Highlighter *highlighter = new Highlighter;
|
||||
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings();
|
||||
highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditorWidget::highlighterFormatCategories()));
|
||||
editor->setSyntaxHighlighter(highlighter);
|
||||
editor->setSyntaxHighlighter(new Highlighter);
|
||||
editor->setIndenter(new Indenter);
|
||||
editor->setAutoCompleter(new AutoCompleter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user