From 8fdd400d99bf380660151c3d41c21b51cd492f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 13 Jul 2020 17:19:26 +0200 Subject: [PATCH] Don't flatten link color in QTextHtmlParser::declarationsForNode It's still flattened in the next step, when the parser calls QTextHtmlParserNode::applyCssDeclarations, but this at least makes it clear where the problem is. Task-number: QTBUG-85567 Change-Id: I1ecc7d808c58297f40f6cf8de86dfa7035e167c9 Reviewed-by: Volker Hilsheimer Reviewed-by: Andy Shaw --- src/gui/text/qtexthtmlparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index c27c521f00..3eb131b5c0 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1932,8 +1932,8 @@ QList standardDeclarationForNode(const QTextHtmlParserNode &n needsUnderline = true; decl.d->property = QLatin1String("color"); decl.d->propertyId = QCss::Color; - val.type = QCss::Value::Color; - val.variant = QVariant(QGuiApplication::palette().link()); + val.type = QCss::Value::Function; + val.variant = QStringList() << QLatin1String("palette") << QLatin1String("link"); decl.d->values = QList { val }; decl.d->inheritable = true; decls << decl;