Commit 73d119f3 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: fix regression in string rewriting

A regression was triggered by testGradientsRewriter().
Trailing "0" are not nice.

Change-Id: I0243ee8250c98cd5742b79af0d0cfef74357b074
Reviewed-by: default avatarMarco Bubke <>
parent 79ca107a
......@@ -55,8 +55,12 @@ inline static QString properColorName(const QColor &color)
inline static QString doubleToString(double d)
QString string = QString::number(d, 'f', 3);
if (string.endsWith(".000"))
if (string.contains(QLatin1Char('.'))) {
while ( 1) == QLatin1Char('0'))
if ( 1) == QLatin1Char('.'))
return string;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment