diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-01-04 13:05:51 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-01-05 11:36:57 +0000 |
commit | 881bb537c92684d25fae4fec9ac2dd61e1f9723c (patch) | |
tree | de753cacab905eae28a510f6a5a10c7082512cf2 /tests/auto/qml/qqmlproperty/data | |
parent | d19acb0cbb81bc270291241fd2fde4bb0869ac89 (diff) |
Make RuntimeHelpers::numberToString() comply with EcmaScript
We could use DoubleToStringConverter::EcmaScriptConverter().ToShortest()
here, but we'd have to #ifdef it for the case that we're using the libc
double conversion. As the formatting does not produce a lot of code I
decided against that.
Task-number: QTBUG-50131
Change-Id: If7a2ef8063b57ab35cda4a60d8ddd65442d70103
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmlproperty/data')
-rw-r--r-- | tests/auto/qml/qqmlproperty/data/floatToStringPrecision.qml | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlproperty/data/floatToStringPrecision.qml b/tests/auto/qml/qqmlproperty/data/floatToStringPrecision.qml index a0429e0cc8..a1ff0c527a 100644 --- a/tests/auto/qml/qqmlproperty/data/floatToStringPrecision.qml +++ b/tests/auto/qml/qqmlproperty/data/floatToStringPrecision.qml @@ -2,9 +2,27 @@ import QtQuick 2.0 QtObject { property double a: 3.4 - property string b: a + property string a1: a + property string a2: a + "" - property double c: 0.035003945 - property string d: c + property double b: 0.035003945 + property string b1: b + property string b2: b + "" + + property double c: 0.0000012345 + property string c1: c + property string c2: c + "" + + property double d: 0.00000012345 + property string d1: d + property string d2: d + "" + + property double e: 100000000000000000000 + property string e1: e + property string e2: e + "" + + property double f: 1000000000000000000000 + property string f1: f + property string f2: f + "" } |