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>
This commit is contained in:
parent
330a9c7f65
commit
3a857c0107
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue