Commit 5ca2d3ac authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.MetaInfo: interpret numberValue as real



Number value is used for integer and real types.
(e.g. QRect and QRectF).

To avoid rounding real to int for QRectF/QSizeF we interpret
numberValue as real.

Change-Id: I051f960d7ef8a391d0a27641516d233175c6d3b1
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 5b8412f3
......@@ -147,10 +147,11 @@ public:
TypeId typeId;
TypeName typeName = typeId(value).toUtf8();
if (typeName == "number") {
if (value->asRealValue())
typeName = "real";
else
if (value->asIntValue()) {
typeName = "int";
} else {
typeName = "real";
}
}
m_properties.append(qMakePair(propertyName, typeName));
}
......
Markdown is supported
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