projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516759a
)
Fix sameValue() for integer vs double 0
author
Lars Knoll
<lars.knoll@digia.com>
Mon, 14 Jan 2013 21:44:38 +0000
(22:44 +0100)
committer
Lars Knoll
<lars.knoll@digia.com>
Tue, 15 Jan 2013 14:16:21 +0000
(15:16 +0100)
Change-Id: Id56699a3e3624c644b14c6ece847a91da0ea7004
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_value.cpp
patch
|
blob
|
history
diff --git
a/qmljs_value.cpp
b/qmljs_value.cpp
index
9ea4be1
..
78c549f
100644
(file)
--- 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;
}