forked from qt-creator/qt-creator
GlslEditor: Fix crash in GlslHighlighter
since the async highlighter implementation the parent is not a TextDocument anymore, but a QTextDocument. Pass the required mimeType via the SyntaxHighlighterRunner now to the SyntaxHighlighter. Change-Id: I0afcbe68719195649b4b7040416a743cb01214df Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
@@ -921,7 +921,10 @@ void TextDocument::resetSyntaxHighlighter(const std::function<SyntaxHighlighter
|
||||
= qtcEnvironmentVariable("QTC_USE_THREADED_HIGHLIGHTER", "TRUE").toUpper()
|
||||
== QLatin1String("TRUE");
|
||||
|
||||
d->m_highlighterRunner = new SyntaxHighlighterRunner(creator, document(), threaded && envValue);
|
||||
d->m_highlighterRunner = new SyntaxHighlighterRunner(creator,
|
||||
document(),
|
||||
threaded && envValue,
|
||||
mimeType());
|
||||
}
|
||||
|
||||
void TextDocument::cleanWhitespace(const QTextCursor &cursor)
|
||||
|
||||
Reference in New Issue
Block a user