aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 13:56:05 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-21 13:01:54 +0000
commit484abc815993040a3be60c657e079eee368bbcd2 (patch)
tree0458a95f0817912cae798b06e79c1fc4775c4938 /src/qml/jsruntime/qv4runtime.cpp
parentb4cb71e9d716e8061bcb491d77bad1a03a7d2930 (diff)
Get rid of asFunctionObject()
Change-Id: Ib4858376dc0ec57fa473c80696abc66a570c90ec Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 008bc309e4..ae618ceb6e 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -314,7 +314,7 @@ ReturnedValue Runtime::deleteName(ExecutionEngine *engine, int nameIndex)
QV4::ReturnedValue Runtime::instanceof(ExecutionEngine *engine, const Value &left, const Value &right)
{
Scope scope(engine);
- ScopedFunctionObject f(scope, right.asFunctionObject());
+ ScopedFunctionObject f(scope, right.as<FunctionObject>());
if (!f)
return engine->throwTypeError();
@@ -405,7 +405,7 @@ ReturnedValue RuntimeHelpers::objectDefaultValue(const Object *object, int typeH
callData->thisObject = *object;
ScopedValue conv(scope, object->get(*meth1));
- if (FunctionObject *o = conv->asFunctionObject()) {
+ if (FunctionObject *o = conv->as<FunctionObject>()) {
ScopedValue r(scope, o->call(callData));
if (r->isPrimitive())
return r->asReturnedValue();
@@ -415,7 +415,7 @@ ReturnedValue RuntimeHelpers::objectDefaultValue(const Object *object, int typeH
return Encode::undefined();
conv = object->get(*meth2);
- if (FunctionObject *o = conv->asFunctionObject()) {
+ if (FunctionObject *o = conv->as<FunctionObject>()) {
ScopedValue r(scope, o->call(callData));
if (r->isPrimitive())
return r->asReturnedValue();
@@ -932,7 +932,7 @@ ReturnedValue Runtime::callActivationProperty(ExecutionEngine *engine, int nameI
if (base)
callData->thisObject = base;
- FunctionObject *o = func->asFunctionObject();
+ FunctionObject *o = func->as<FunctionObject>();
if (!o) {
QString objectAsString = QStringLiteral("[null]");
if (base)
@@ -1101,7 +1101,7 @@ ReturnedValue Runtime::typeofValue(ExecutionEngine *engine, const Value &value)
case Value::Managed_Type:
if (value.isString())
res = engine->id_string;
- else if (value.objectValue()->asFunctionObject())
+ else if (value.objectValue()->as<FunctionObject>())
res = engine->id_function;
else
res = engine->id_object; // ### implementation-defined