aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-27 22:19:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:34:16 +0200
commit5564ba9987273949281b37533b798ebe59553f0e (patch)
treeaeb0d484f7bcd0106faac6d6005ed62d7b93ff97 /tests/auto/qml/qqmlecmascript
parentea46da2cfd62b24816a6b2dccc6a254dd0490780 (diff)
Fix compilation of the auto test
Change-Id: I8c10463aa064a25c0170e6b7f294f48501b42319 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index cba0267b26..a93aabd266 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -1233,13 +1233,17 @@ public:
{
QQmlData *ddata = QQmlData::get(this);
assert(ddata);
- QV4::QObjectWrapper *thisObject = QV4::Value::fromReturnedValue(ddata->jsWrapper.value()).as<QV4::QObjectWrapper>();
- assert(thisObject);
+ QV4::ExecutionEngine *v4 = ddata->jsWrapper.engine();
+ Q_ASSERT(v4);
+ QV4::Scope scope(v4);
+ QV4::Scoped<QV4::QObjectWrapper> thisObject(scope, ddata->jsWrapper.value());
+ Q_ASSERT(thisObject);
QQmlData *otherDData = QQmlData::get(other);
assert(otherDData);
- thisObject->defineDefaultProperty(QStringLiteral("autoTestStrongRef"), QV4::Value::fromReturnedValue(otherDData->jsWrapper.value()));
+ QV4::ScopedValue v(scope, otherDData->jsWrapper.value());
+ thisObject->defineDefaultProperty(QStringLiteral("autoTestStrongRef"), v);
}
void setEngine(QQmlEngine* declarativeEngine)