From 939ef5eb383c43122d7ea44ab58c2f8b62461e39 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 4 May 2011 12:54:10 +1000 Subject: [PATCH] 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 (cherry picked from commit 1ea84cba1f90a9c95c54480117342dba0eae3d2f) --- .../qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index a0e2547..c4f4058 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").arg(values[0], values[1]); if (!modelData) continue; -- 2.7.4