aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-06-20 08:09:16 +0200
committerDavid Schulz <david.schulz@qt.io>2019-06-20 12:25:21 +0000
commit7b6ebea648bae91ee4ba014237eae34eb34d3805 (patch)
tree4cd3a24bf7b78d1ae6b41b3bc1c21ad3eba61897 /src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
parentbd3037464e6d1f6a3af7beb6c40a49b54433efca (diff)
Update KSyntaxHighlighting 5.52 -> 5.59
Task-number: QTCREATORBUG-22558 Change-Id: I2eac03b54f2c2d330ee9b5d0037ee42a6640d76b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp')
-rw-r--r--src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp b/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
index 2bb61a7ae66..4987dc95f08 100644
--- a/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
+++ b/src/libs/3rdparty/syntax-highlighting/src/lib/syntaxhighlighter.cpp
@@ -156,15 +156,15 @@ void SyntaxHighlighter::highlightBlock(const QString& text)
void SyntaxHighlighter::applyFormat(int offset, int length, const KSyntaxHighlighting::Format& format)
{
- if (format.isDefaultTextStyle(theme()) || length == 0)
+ if (length == 0)
return;
QTextCharFormat tf;
- if (format.hasTextColor(theme()))
- tf.setForeground(format.textColor(theme()));
+ // always set the foreground color to avoid palette issues
+ tf.setForeground(format.textColor(theme()));
+
if (format.hasBackgroundColor(theme()))
tf.setBackground(format.backgroundColor(theme()));
-
if (format.isBold(theme()))
tf.setFontWeight(QFont::Bold);
if (format.isItalic(theme()))