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)
This commit is contained in:
parent
17bf9b17e7
commit
77ff187b92
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user