summaryrefslogtreecommitdiffstats
path: root/tests/auto/qitemmodel
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-06 15:22:07 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-18 10:46:46 +1000
commit6354d890f39127df44f3db77c2d7d2be854ea752 (patch)
treecca0d4f1aac6098649a82a7582cce75db7e4ecab /tests/auto/qitemmodel
parent72fb8797642ec4c9151fcd805e377bd52e4c1756 (diff)
Remove Q_ASSERT from qitemmodel autotest
If populateTestData() is passed an unknown type of model, report a meaningful fatal error rather than failing silently in a release build and aborting with an uninformative error message in a debug build. Change-Id: I7ee8d1262bbced304f9f24c2ec9b40a38704d982 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 6b2e89843a573cd7c143bca17cec8e69209d2fbd)
Diffstat (limited to 'tests/auto/qitemmodel')
-rw-r--r--tests/auto/qitemmodel/modelstotest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qitemmodel/modelstotest.cpp b/tests/auto/qitemmodel/modelstotest.cpp
index cec170334f..4e63307994 100644
--- a/tests/auto/qitemmodel/modelstotest.cpp
+++ b/tests/auto/qitemmodel/modelstotest.cpp
@@ -372,7 +372,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
return QModelIndex();
}
- Q_ASSERT(false);
+ qFatal("%s: unknown type of model", Q_FUNC_INFO);
return QModelIndex();
}