From 4ffa7d3f651757b7bc10ae9801b7802a8f2e260f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 5 Nov 2013 13:20:24 +0100 Subject: 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 --- dist/changes-5.2.0 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0 index 969d4e30e6..9db8458319 100644 --- a/dist/changes-5.2.0 +++ b/dist/changes-5.2.0 @@ -42,6 +42,10 @@ Third party components flag QSGNode::DirtySubtreeBlocked whenever the state of QSGNode::isSubtreeBlocked() is changed. + - When assigning double precision floating point values to integer properties, + the engine now truncates instead of rounding. This is consistent with the + ECMAScript specification's way of converting doubles to ints. + **************************************************************************** * Library * **************************************************************************** -- cgit v1.2.3