aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/testlib/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index 8a751300d0..81dcaa2fc3 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -97,7 +97,9 @@ public Q_SLOTS:
}
}
- return QQmlV4Handle(v8::String::New(name.toUtf8())->v4Value());
+ QQmlEngine *engine = qmlEngine(this);
+ QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine->handle());
+ return QQmlV4Handle(QV4::Value::fromString(v4->newString(name)));
}
bool compare(const QVariant& act, const QVariant& exp) const {