diff options
author | David Schulz <david.schulz@qt.io> | 2023-06-15 13:28:33 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2023-06-16 11:05:00 +0000 |
commit | 5ba10671daf2761db4defd825c859460d949616a (patch) | |
tree | 93d6a45516a2ec3277272848b88ac706a534451e /src/plugins/texteditor/syntaxhighlighter.cpp | |
parent | db8842a0d480d36b568336889a06e623f0c1685e (diff) |
CppEditor: fix highlighter tests
amends 9091c994298f75ca76a9e1244236925320f60e15
Change-Id: Iaa64d51aa0dad1d63c88a51bfa55afa2367e65ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp')
-rw-r--r-- | src/plugins/texteditor/syntaxhighlighter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index 21db8c0cd3..d8b39a5c2c 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -869,6 +869,13 @@ QTextCharFormat SyntaxHighlighter::whitespacified(const QTextCharFormat &fmt) return format; } +QTextCharFormat SyntaxHighlighter::asSyntaxHighlight(const QTextCharFormat &fmt) +{ + QTextCharFormat format = fmt; + format.setProperty(SyntaxHighlight, true); + return format; +} + void SyntaxHighlighter::highlightBlock(const QString &text) { formatSpaces(text); |