Fix rounding behavior of Qml when assigning doubles to integer properties
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 5 Nov 2013 12:20:24 +0000 (13:20 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 5 Nov 2013 20:13:00 +0000 (21:13 +0100)
commit4ffa7d3f651757b7bc10ae9801b7802a8f2e260f
tree973b50f41d00719c179b9a332feca11dc0c0f32c
parentb63e2e270f79d76d5624e73eb6d05b1bbb55968f
Fix rounding behavior of Qml when assigning doubles to integer properties

The engine used to round, but that is inconsistent with ECMAScript's way of
converting doubles to integers by truncation.

With this patch we can also enable the propagation of integer type information
into the IR, but we have to be careful not to utilize it when writing
properties.

Change-Id: I04af4879ba5131349eca2eeff2b27f4598f5267b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
dist/changes-5.2.0
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlproperty.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
tests/auto/quick/qquickstates/tst_qquickstates.cpp