summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-07 03:27:23 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-07 04:26:45 (GMT)
commitb3beb6ded506f1701b68642d981c63295bc6c6a2 (patch)
tree24eadcd6d3c1e1796ab142bd6b059f07f04f238c /tests/auto
parent60c9d955918dde759ac038ff73c7767d62add3b7 (diff)
downloadQt-b3beb6ded506f1701b68642d981c63295bc6c6a2.zip
Qt-b3beb6ded506f1701b68642d981c63295bc6c6a2.tar.gz
Qt-b3beb6ded506f1701b68642d981c63295bc6c6a2.tar.bz2
Disallow nested elements in ListModel
QTBUG-6082
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index d02f54f..8214723 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -528,7 +528,11 @@ void tst_QDeclarativeListModel::error_data()
QTest::newRow("default properties not allowed in ListElement")
<< "import Qt 4.6\nListModel { ListElement { Item { } } }"
- << "QTBUG-6082 ListElement should not allow child objects";
+ << "ListElement: cannot contain nested elements";
+
+ QTest::newRow("QML elements not allowed in ListElement")
+ << "import Qt 4.6\nListModel { ListElement { a: Item { } } }"
+ << "ListElement: cannot contain nested elements";
}
void tst_QDeclarativeListModel::error()
@@ -543,8 +547,6 @@ void tst_QDeclarativeListModel::error()
if (error.isEmpty()) {
QVERIFY(!component.isError());
} else {
- if (error.startsWith(QLatin1String("QTBUG-")))
- QEXPECT_FAIL("",error.toLatin1(),Abort);
QVERIFY(component.isError());
QList<QDeclarativeError> errors = component.errors();
QCOMPARE(errors.count(),1);