aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index fe2256319b..1b4ff71beb 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -1456,8 +1456,8 @@ void tst_qqmllanguage::dynamicObjectProperties()
QScopedPointer<QObject> object(component.create());
QVERIFY(object != nullptr);
- QCOMPARE(object->property("objectProperty"), qVariantFromValue((QObject*)nullptr));
- QVERIFY(object->property("objectProperty2") != qVariantFromValue((QObject*)nullptr));
+ QCOMPARE(object->property("objectProperty"), QVariant::fromValue((QObject*)nullptr));
+ QVERIFY(object->property("objectProperty2") != QVariant::fromValue((QObject*)nullptr));
}
{
QQmlComponent component(&engine, testFileUrl("dynamicObjectProperties.2.qml"));
@@ -1465,7 +1465,7 @@ void tst_qqmllanguage::dynamicObjectProperties()
QScopedPointer<QObject> object(component.create());
QVERIFY(object != nullptr);
- QVERIFY(object->property("objectProperty") != qVariantFromValue((QObject*)nullptr));
+ QVERIFY(object->property("objectProperty") != QVariant::fromValue((QObject*)nullptr));
}
}
@@ -1734,7 +1734,7 @@ void tst_qqmllanguage::aliasProperties()
// Write through alias
MyQmlObject *v2 = new MyQmlObject();
v2->setParent(object.data());
- object->setProperty("aliasObject", qVariantFromValue(v2));
+ object->setProperty("aliasObject", QVariant::fromValue(v2));
MyQmlObject *v3 =
qvariant_cast<MyQmlObject *>(object->property("aliasObject"));
QVERIFY(v3 != nullptr);
@@ -3810,7 +3810,7 @@ void tst_qqmllanguage::scopedEnumsWithNameClash()
{
auto typeId = qmlRegisterUncreatableType<ScopedEnumsWithNameClash>("ScopedEnumsWithNameClashTest", 1, 0, "ScopedEnum", "Dummy reason");
auto registryGuard = qScopeGuard([typeId]() {
- qmlUnregisterType(typeId);
+ QQmlMetaType::unregisterType(typeId);
});
QQmlEngine engine;
@@ -3829,7 +3829,7 @@ void tst_qqmllanguage::scopedEnumsWithResolvedNameClash()
{
auto typeId = qmlRegisterUncreatableType<ScopedEnumsWithResolvedNameClash>("ScopedEnumsWithResolvedNameClashTest", 1, 0, "ScopedEnum", "Dummy reason");
auto registryGuard = qScopeGuard([typeId]() {
- qmlUnregisterType(typeId);
+ QQmlMetaType::unregisterType(typeId);
});
QQmlEngine engine;