aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-13 14:57:47 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-09-20 08:54:42 +0200
commita2db40e6c070017960b9f815c66cab354e3466dc (patch)
treee549b977fb738cd0092d801d54025c0cff79414c /tests/auto/qml/qqmlecmascript
parent85ba26c64488b76bf7fac37bc001d9762188009a (diff)
V4: Make ExecutionEngine::toVariant() static
Wherever we need an engine in there, we also have a managed value to get it from. This relieves us from the requirement to drag an engine around wherever we want to call toVariant(). Change-Id: Ib95d02b5fbf5eaa494214e337c9b700e97e5e0df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h2
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index de8871129d..da882d7840 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -924,7 +924,7 @@ public:
QV4::Scope scope(v->v4engine());
for (int i = 0, end = v->length(); i != end; ++i) {
QV4::ScopedValue v4Value(scope, (*v)[i]);
- m_actuals.append(v->v4engine()->toVariant(v4Value, QMetaType()));
+ m_actuals.append(QV4::ExecutionEngine::toVariant(v4Value, QMetaType()));
}
}
Q_INVOKABLE void method_overload2(const QVariantList &list)
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 10dd2ec823..340b1a148d 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2918,7 +2918,7 @@ void tst_qqmlecmascript::callQtInvokables()
{
QV4::ScopedValue ret(scope, EVALUATE("object.method_NoArgs_QPointF()"));
QVERIFY(!ret->isUndefined());
- QCOMPARE(scope.engine->toVariant(ret, QMetaType {}), QVariant(QPointF(123, 4.5)));
+ QCOMPARE(QV4::ExecutionEngine::toVariant(ret, QMetaType {}), QVariant(QPointF(123, 4.5)));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 3);
QCOMPARE(o->actuals().count(), 0);