aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-16 12:44:51 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 12:30:41 +0100
commit0c2ab6e20ca23e74055d0a95539315cf1bf360bf (patch)
treeb36a65f2f32c87c7c11661e82d3a881211a79207 /src/qml/jsruntime/qv4jsonobject.cpp
parentef6b4938b9ec309d5faf0c966cb2b58f3de2ca77 (diff)
Store a double in NumberObject
Makes more sense than storing a Value in there. Change-Id: I2e6ca71477100c1e1639bb89cced4f4049b5e5c2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 724a2e0d7b..c8582f13de 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -729,11 +729,11 @@ QString Stringify::Str(const QString &key, const Value &v)
o = value->asReturnedValue();
if (o) {
if (NumberObject *n = o->asNumberObject())
- value = n->value();
+ value = Encode(n->value());
else if (StringObject *so = o->asStringObject())
value = so->d()->value;
else if (BooleanObject *b =o->asBooleanObject())
- value = b->value();
+ value = Encode(b->value());
}
if (value->isNull())
@@ -934,7 +934,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
ScopedValue s(scope, ctx->argument(2));
if (NumberObject *n = s->asNumberObject())
- s = n->value();
+ s = Encode(n->value());
else if (StringObject *so = s->asStringObject())
s = so->d()->value;