From 6b2e89843a573cd7c143bca17cec8e69209d2fbd Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 6 May 2011 15:22:07 +1000 Subject: 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 --- tests/auto/qitemmodel/modelstotest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qitemmodel/modelstotest.cpp b/tests/auto/qitemmodel/modelstotest.cpp index cec1703..4e63307 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(); } -- cgit v0.12