From 90bd5ce6b0893fb4c819c85837aba58e10d0a4eb Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Apr 2014 16:32:00 +0200 Subject: [PATCH] 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 --- src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp b/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp index 280b2aec49f..f5ac682c78d 100644 --- a/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp +++ b/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp @@ -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