forked from qt-creator/qt-creator
TextEditor: simplify SyntaxHighlighterRunner interface
Change-Id: I6c8d51d8dccc91514c89267eac2cea66c87a871a Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -921,10 +921,12 @@ void TextDocument::resetSyntaxHighlighter(const std::function<SyntaxHighlighter
|
||||
= qtcEnvironmentVariable("QTC_USE_THREADED_HIGHLIGHTER", "TRUE").toUpper()
|
||||
== QLatin1String("TRUE");
|
||||
|
||||
d->m_highlighterRunner = new SyntaxHighlighterRunner(creator,
|
||||
SyntaxHighlighter *highlighter = creator();
|
||||
highlighter->setFontSettings(TextEditorSettings::fontSettings());
|
||||
highlighter->setMimeType(mimeType());
|
||||
d->m_highlighterRunner = new SyntaxHighlighterRunner(highlighter,
|
||||
document(),
|
||||
threaded && envValue,
|
||||
mimeType());
|
||||
threaded && envValue);
|
||||
}
|
||||
|
||||
void TextDocument::cleanWhitespace(const QTextCursor &cursor)
|
||||
|
||||
Reference in New Issue
Block a user