Don't show functions that triggered no temporary allocations in top list.
authorMilian Wolff <milian.wolff@kdab.com>
Mon, 29 Feb 2016 13:39:46 +0000 (14:39 +0100)
committerMilian Wolff <milian.wolff@kdab.com>
Mon, 29 Feb 2016 13:39:46 +0000 (14:39 +0100)
gui/topproxy.cpp

index f396337..62364df 100644 (file)
@@ -59,9 +59,11 @@ bool TopProxy::filterAcceptsRow(int source_row, const QModelIndex& source_parent
         // only show top rows
         return false;
     }
-    if (m_type == Leaked && !sourceModel()->index(source_row, TreeModel::LeakedColumn).data(TreeModel::SortRole).toULongLong()) {
-        // don't show rows that didn't leak anything
-        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;
+        }
     }
     return true;
 }