diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-09 07:14:39 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-09 08:46:19 (GMT) |
commit | e12b912de89088a307c3519a01198a5314b8dd1a (patch) | |
tree | c1c917eeaaa1d8a1f78370b785de7c840238478f /tests/auto | |
parent | c0c7e04c9248ce38278aceefeb527f29149cfb4e (diff) | |
download | Qt-e12b912de89088a307c3519a01198a5314b8dd1a.zip Qt-e12b912de89088a307c3519a01198a5314b8dd1a.tar.gz Qt-e12b912de89088a307c3519a01198a5314b8dd1a.tar.bz2 |
Remove Q_ASSERT's from QTreeView autotest
Report fatal errors instead of failing silently in non-debug builds.
Change-Id: Ieaff30b71dba2a385a5fffc93d2a8c0f5864aa18
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtreeview/tst_qtreeview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index 551b63f..1f0c2ce 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -277,7 +277,8 @@ public: } int rowCount(const QModelIndex& parent = QModelIndex()) const { - Q_ASSERT(fetched); + if (!fetched) + qFatal("%s: rowCount should not be called before fetching", Q_FUNC_INFO); if ((parent.column() > 0) || (level(parent) > levels)) return 0; return rows; @@ -2567,7 +2568,8 @@ public: } } if (parent == 0) { - Q_ASSERT(children.isEmpty()); + if (!children.isEmpty()) + qFatal("%s: children should be empty when parent is null", Q_FUNC_INFO); populate(); } else { isDead = true; |