Generalize function for visualizing whitespace from CppHighligher

Move function which formats all non-whitespace with a given format, and
all whitespace in the same range with correct whitespace highlighting
(merged with the non-whitespace format), from CppHighlighter to
SyntaxHighligher.

Change-Id: I8cac306f6362e804698068a0df0292f88726264f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2017-05-07 17:04:37 +02:00
parent db11c01df8
commit 0a1376dd2c
4 changed files with 43 additions and 34 deletions

View File

@@ -85,6 +85,8 @@ protected:
QTextCharFormat format(int pos) const;
void formatSpaces(const QString &text);
void setFormatWithSpaces(const QString &text, int start, int count,
const QTextCharFormat &format);
int previousBlockState() const;
int currentBlockState() const;