From: Lars Knoll Date: Mon, 14 Jan 2013 21:44:38 +0000 (+0100) Subject: Fix sameValue() for integer vs double 0 X-Git-Tag: upstream/5.2.1~669^2~659^2~520 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d8deae65ed07b4a89d5a6b4a9f04201db07809a;p=platform%2Fupstream%2Fqtdeclarative.git Fix sameValue() for integer vs double 0 Change-Id: Id56699a3e3624c644b14c6ece847a91da0ea7004 Reviewed-by: Simon Hausmann --- diff --git a/qmljs_value.cpp b/qmljs_value.cpp index 9ea4be1..78c549f 100644 --- a/qmljs_value.cpp +++ b/qmljs_value.cpp @@ -84,6 +84,10 @@ bool Value::sameValue(Value other) { return true; if (isString() && other.isString()) return stringValue()->isEqualTo(other.stringValue()); + if (isInteger() && int_32 == 0 && other.dbl == 0) + return true; + if (dbl == 0 && other.isInteger() && other.int_32 == 0) + return true; return false; }