From b53ea6973102e3ec2a7c84da3496b61d01070b99 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 11 Apr 2012 22:06:05 -0700 Subject: qss: fix parsing of icon style hints Use cssIconValueToIcon (see 5a0eb4e768435b9ce32b074e620fca33be4df2fb) to retrieve the QIcon value from the css parser. Task-number: QTBUG-25120 Change-Id: Ie7c6691514a4b35d416ca09ccf7966689de831c1 Reviewed-by: Friedemann Kleint --- src/widgets/styles/qstylesheetstyle.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 0e928b13c2..89e8f59315 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -991,9 +991,8 @@ QRenderRule::QRenderRule(const QVector &declarations, const QWidget hintValue = (int) decl.colorValue().rgba(); } else if (hintName.endsWith(QLatin1String("size"))) { hintValue = decl.sizeValue(); - // ### Qt5 -// } else if (hintName.endsWith(QLatin1String("icon"))) { -// hintValue = decl.iconValue(); + } else if (hintName.endsWith(QLatin1String("icon"))) { + hintValue = cssIconValueToIcon(decl.iconValue()); } else if (hintName == QLatin1String("button-layout") && decl.d->values.count() != 0 && decl.d->values.at(0).type == Value::String) { hintValue = subControlLayout(decl.d->values.at(0).variant.toString()); -- cgit v1.2.3