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:
Christian Kandeler
2014-04-24 16:32:00 +02:00
parent 6a33fb3293
commit 90bd5ce6b0

View File

@@ -239,7 +239,7 @@ int ErrorListModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid())
return 0;
return qMax(1, d->errors.count());
return d->errors.count();
}
int ErrorListModel::columnCount(const QModelIndex &parent) const