diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-03-18 11:01:28 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-03-21 12:45:13 +0100 |
commit | 3a857c010754c293beb77a4327b193599b454499 (patch) | |
tree | 0ed4f83e81b5e29ad62e7d1182f8d7c27b9129de /tests/auto/qml/qqmllistreference | |
parent | 330a9c7f65daa959cb3b4faab0ddcaa7dd6d3434 (diff) |
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 <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllistreference')
-rw-r--r-- | tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
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() |