summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index fbc5c10e3c..888be1733e 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -313,7 +313,7 @@ ReturnedValue FunctionPrototype::method_toString(SimpleCallContext *ctx)
if (!fun)
ctx->throwTypeError();
- return Value::fromString(ctx, QStringLiteral("function() { [code] }")).asReturnedValue();
+ return ctx->engine->newString(QStringLiteral("function() { [code] }"))->asReturnedValue();
}
ReturnedValue FunctionPrototype::method_apply(SimpleCallContext *ctx)