summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-04 02:54:10 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-04 04:47:47 (GMT)
commit1ea84cba1f90a9c95c54480117342dba0eae3d2f (patch)
tree40f50dc2ac210a88d89c2fa275d7000ca0794e6d /tests/auto
parent6f791f8ad0b7ef023d91c1609ce076443f335c13 (diff)
downloadQt-1ea84cba1f90a9c95c54480117342dba0eae3d2f.zip
Qt-1ea84cba1f90a9c95c54480117342dba0eae3d2f.tar.gz
Qt-1ea84cba1f90a9c95c54480117342dba0eae3d2f.tar.bz2
Remove Q_ASSERT from qdeclarativexmllistmodel test
Report a meaningful warning in all builds rather than aborting in debug builds and doing nothing in release builds. Change-Id: I14aa7bc8699f5307e1ec34b18006b9fbbd8aca8e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index af54008..4ec2783 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -126,7 +126,10 @@ private:
QStringList fields = item.split(",");
foreach(const QString &field, fields) {
QStringList values = field.split("=");
- Q_ASSERT(values.count() == 2);
+ if (values.count() != 2) {
+ qWarning() << "makeItemXmlAndData: invalid field:" << field;
+ continue;
+ }
xml += QString("<%1>%2</%1>").arg(values[0], values[1]);
if (!modelData)
continue;