aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-24 15:25:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-26 09:05:32 +0200
commit74807c0725ad6ef6ccd49611bb9f4f994cddf106 (patch)
tree9f1d08155a46bdbef45390b3a017ea6f7a430700 /tests/auto/qml/qqmlecmascript
parent9062476491dd1c81f63bb7a3ae6e6a080db1db1e (diff)
Move more API over to use ValueRef
Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index a5f30a01c2..625971fc05 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2287,7 +2287,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const
return false;
}
-static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o,
+static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o,
const char *source, const QV4::Value &result)
{
QString functionSource = QLatin1String("(function(object) { return ") +
@@ -2424,8 +2424,8 @@ void tst_qqmlecmascript::callQtInvokables()
o->reset();
{
- QV4::Value ret = EVALUATE("object.method_NoArgs_QPointF()");
- QVERIFY(!ret.isUndefined());
+ QV4::ScopedValue ret(scope, EVALUATE("object.method_NoArgs_QPointF()"));
+ QVERIFY(!ret->isUndefined());
QCOMPARE(engine->toVariant(ret, -1), QVariant(QPointF(123, 4.5)));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 3);
@@ -2434,8 +2434,8 @@ void tst_qqmlecmascript::callQtInvokables()
o->reset();
{
- QV4::Value ret = EVALUATE("object.method_NoArgs_QObject()");
- QV4::QObjectWrapper *qobjectWrapper = ret.as<QV4::QObjectWrapper>();
+ QV4::ScopedValue ret(scope, EVALUATE("object.method_NoArgs_QObject()"));
+ QV4::QObjectWrapper *qobjectWrapper = ret->as<QV4::QObjectWrapper>();
QVERIFY(qobjectWrapper);
QCOMPARE(qobjectWrapper->object(), (QObject *)o);
QCOMPARE(o->error(), false);
@@ -2460,7 +2460,7 @@ void tst_qqmlecmascript::callQtInvokables()
}
o->reset();
- QVERIFY(EVALUATE_VALUE("object.method_NoArgs_QVariant()", engine->toString("QML rocks")));
+ QVERIFY(EVALUATE_VALUE("object.method_NoArgs_QVariant()", QV4::Value::fromReturnedValue(engine->toString("QML rocks"))));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 7);
QCOMPARE(o->actuals().count(), 0);