From 12fd2ccd3fa2dc0133b5a3fb89f9fdf5cf721232 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 23 Sep 2013 15:52:10 +0200 Subject: Fix Persistent/WeakValue API Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4script_p.h') diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 752cb2ac53..030622cf72 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -73,10 +73,10 @@ struct Q_QML_EXPORT Script { : sourceFile(source), line(line), column(column), sourceCode(sourceCode) , scope(scope), strictMode(false), inheritContext(false), parsed(false) , vmFunction(0), parseAsBinding(false) {} - Script(ExecutionEngine *engine, Object *qml, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) + Script(ExecutionEngine *engine, ObjectRef qml, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) : sourceFile(source), line(line), column(column), sourceCode(sourceCode) , scope(engine->rootContext), strictMode(false), inheritContext(true), parsed(false) - , qml(Value::fromObject(qml)), vmFunction(0), parseAsBinding(true) {} + , qml(qml.asReturnedValue()), vmFunction(0), parseAsBinding(true) {} ~Script(); QString sourceFile; int line; @@ -98,7 +98,7 @@ struct Q_QML_EXPORT Script { Function *function(); - static ReturnedValue evaluate(ExecutionEngine *engine, const QString &script, Object *scopeObject); + static ReturnedValue evaluate(ExecutionEngine *engine, const QString &script, ObjectRef scopeObject); }; } -- cgit v1.2.3