forked from qt-creator/qt-creator
Valgrind: Return correct row count from ErrorListModel.
Inexplicably, the current implementation returns 1 if the error list is empty, which results in a bogus entry in the view and is sure to confuse people to the point that they might think the analyzer is not working at all (I know I did). Change-Id: I9f5999f859347993b012c408129f18260a8c2bea Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -239,7 +239,7 @@ int ErrorListModel::rowCount(const QModelIndex &parent) const
|
|||||||
{
|
{
|
||||||
if (parent.isValid())
|
if (parent.isValid())
|
||||||
return 0;
|
return 0;
|
||||||
return qMax(1, d->errors.count());
|
return d->errors.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ErrorListModel::columnCount(const QModelIndex &parent) const
|
int ErrorListModel::columnCount(const QModelIndex &parent) const
|
||||||
|
|||||||
Reference in New Issue
Block a user