aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 11:47:25 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-21 13:01:35 +0000
commit99b15c8f47c6ce5f7d63e19b2e2429536c254064 (patch)
treeda54d296e983bab09ad635f340e71e3420be03ab /src/qml/jsruntime/qv4jsonobject.cpp
parent220f2cddad824e2ab41f056a120d01151d3cf9b4 (diff)
Get rid of asNumberObject
Change-Id: Ie6355beabce3de65c215514d9dc98294b5980c9d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.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 8c6bdb7a2a..ef298c5cc9 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -700,7 +700,7 @@ QString Stringify::Str(const QString &key, const Value &v)
o = value->asReturnedValue();
if (o) {
- if (NumberObject *n = o->asNumberObject())
+ if (NumberObject *n = o->as<NumberObject>())
value = Encode(n->value());
else if (StringObject *so = o->as<StringObject>())
value = so->d()->value;
@@ -893,7 +893,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
ScopedValue v(scope);
for (uint i = 0; i < arrayLen; ++i) {
v = o->getIndexed(i);
- if (v->asNumberObject() || v->as<StringObject>() || v->isNumber())
+ if (v->as<NumberObject>() || v->as<StringObject>() || v->isNumber())
v = RuntimeHelpers::toString(scope.engine, v);
if (v->isString()) {
String *s = v->stringValue();
@@ -905,7 +905,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
}
ScopedValue s(scope, ctx->argument(2));
- if (NumberObject *n = s->asNumberObject())
+ if (NumberObject *n = s->as<NumberObject>())
s = Encode(n->value());
else if (StringObject *so = s->as<StringObject>())
s = so->d()->value;