diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index bd19bd3743..a14f942e6b 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -96,6 +96,8 @@ private slots: void threading_data(); void propertyChanges(); + void roleCrash(); + private: QString makeItemXmlAndData(const QString &data, QDeclarativeXmlModelData *modelData = 0) const { @@ -825,6 +827,15 @@ void tst_qdeclarativexmllistmodel::propertyChanges() delete model; } +void tst_qdeclarativexmllistmodel::roleCrash() +{ + // don't crash + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleCrash.qml")); + QDeclarativeXmlListModel *model = qobject_cast<QDeclarativeXmlListModel*>(component.create()); + QVERIFY(model != 0); + delete model; +} + QTEST_MAIN(tst_qdeclarativexmllistmodel) #include "tst_qdeclarativexmllistmodel.moc" |