diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-09 17:14:39 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:46:47 +1000 |
commit | 77ff187b9264a5da8f5487f9fc2b7f8fe715680b (patch) | |
tree | dadc9da8a95d06a39a115a58209be129f6152957 /tests/auto/qtreeview | |
parent | 17bf9b17e72ea00e55ed64d77a85b5ff1ed98b4c (diff) |
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
(cherry picked from commit e12b912de89088a307c3519a01198a5314b8dd1a)
Diffstat (limited to 'tests/auto/qtreeview')
-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 551b63ff65..1f0c2cee7e 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; |