From 3a857c010754c293beb77a4327b193599b454499 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 18 Mar 2022 11:01:28 +0100 Subject: Fix compiler warning from deprecated API tst_qqmllistreference.cpp:828:23: warning: 'QQmlListReference' is deprecated: Drop the QQmlEngine* argument [-Wdeprecated-declarations] Since without the engine argument the test case is identical to the previous block, we can just as well remove it. Change-Id: I4e4b29a69dfdd60ed1678361d7796739ecead41e Reviewed-by: Ulf Hermann Reviewed-by: Fabian Kosmale --- tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/auto/qml/qqmllistreference') diff --git a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp index 7ec52731e4..52be858c2d 100644 --- a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp +++ b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp @@ -825,7 +825,7 @@ void tst_qqmllistreference::engineTypes() const QMetaProperty prop = m->property(index); const QVariant var = prop.read(o); - QQmlListReference fromVar(var, &engine); + QQmlListReference fromVar(var); QVERIFY(fromVar.isValid()); QCOMPARE(fromVar.count(), 2); QCOMPARE(fromVar.listElementType(), ref.listElementType()); @@ -881,17 +881,11 @@ void tst_qqmllistreference::compositeListProperty() QVERIFY(!i1.isNull()); QVERIFY(!i2.isNull()); - // Without engine: We know the element type now. + // We know the element type now. QQmlListReference list1(object.data(), "items"); QVERIFY(list1.listElementType() != nullptr); QVERIFY(list1.append(i1.data())); QVERIFY(list1.replace(0, i2.data())); - - // With engine: same - QQmlListReference list2(object.data(), "items", &engine); - QVERIFY(list2.listElementType() != nullptr); - QVERIFY(list2.append(i1.data())); - QVERIFY(list2.replace(0, i2.data())); } void tst_qqmllistreference::nullItems() -- cgit v1.2.3