aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:38 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-05-16 18:16:38 +0300
commitae66ecf0f95c79d730190b92e641c0410d5d6896 (patch)
tree5e5ff0c1f08148a7a421581ba0907314aa90d6a3 /tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
parent04ea6df18a2b06efd133a4f1b13c2e38817279ae (diff)
parent53086eaf2ffb5fc1c360cf13f3d87e8d5f2a7b6f (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into tqtc/lts-5.15-opensourcev5.15.5-lts-lgpl
Diffstat (limited to 'tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp')
-rw-r--r--tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
index 71550a50f3..9bc359d243 100644
--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
+++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
@@ -45,6 +45,7 @@ private slots:
void valueWithoutCallingObjectFirst_data();
void valueWithoutCallingObjectFirst();
void filterOnGroup_removeWhenCompleted();
+ void qtbug_86017();
};
class AbstractItemModel : public QAbstractItemModel
@@ -147,6 +148,20 @@ void tst_QQmlDelegateModel::filterOnGroup_removeWhenCompleted()
QQmlDelegateModel *model = root->findChild<QQmlDelegateModel*>();
QVERIFY(model);
QTest::qWaitFor([=]{ return model->count() == 2; } );
+
+void tst_QQmlDelegateModel::qtbug_86017()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl("qtbug_86017.qml"));
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY2(root, qPrintable(component.errorString()));
+ QTRY_VERIFY(component.isReady());
+ QQmlDelegateModel *model = qobject_cast<QQmlDelegateModel*>(root.data());
+
+ QVERIFY(model);
+ QCOMPARE(model->count(), 2);
+ QCOMPARE(model->filterGroup(), "selected");
}
QTEST_MAIN(tst_QQmlDelegateModel)