Skip top rows without cost.
authorMilian Wolff <milian.wolff@kdab.com>
Mon, 20 Jun 2016 11:52:16 +0000 (13:52 +0200)
committerMilian Wolff <milian.wolff@kdab.com>
Mon, 20 Jun 2016 12:54:48 +0000 (14:54 +0200)
This can happen when diffing files.

gui/topproxy.cpp

index 62364df..40a2398 100644 (file)
@@ -59,11 +59,9 @@ bool TopProxy::filterAcceptsRow(int source_row, const QModelIndex& source_parent
         // only show top rows
         return false;
     }
-    if (m_type == Leaked || m_type == Temporary) {
-        if (!sourceModel()->index(source_row, toSource(m_type)).data(TreeModel::SortRole).toULongLong()) {
-            // don't show rows that didn't leak anything, or didn't trigger any temporary allocations
-            return false;
-        }
+    if (!sourceModel()->index(source_row, toSource(m_type)).data(TreeModel::SortRole).toULongLong()) {
+        // don't show rows that didn't leak anything, or didn't trigger any temporary allocations
+        return false;
     }
     return true;
 }