From a10aeacab1a1b83acb505dd3454c6898f2c309d1 Mon Sep 17 00:00:00 2001 From: Pulak Malhotra <56169176+PulakIIIT@users.noreply.github.com> Date: Thu, 29 Jul 2021 17:21:01 +0530 Subject: [PATCH] Added more columns to block tables --- src/widgets/WindowsHeapWidget.cpp | 8 ++++++++ src/widgets/WindowsHeapWidget.h | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/widgets/WindowsHeapWidget.cpp b/src/widgets/WindowsHeapWidget.cpp index b3428c97..a8278e47 100644 --- a/src/widgets/WindowsHeapWidget.cpp +++ b/src/widgets/WindowsHeapWidget.cpp @@ -53,6 +53,10 @@ QVariant WindowsHeapModel::data(const QModelIndex &index, int role) const return RAddressString(item.userAddress); case SizeColumn: return item.size; + case UnusedColumn: + return item.unusedBytes; + case GranularityColumn: + return item.granularity; case TypeColumn: return item.type; default: @@ -75,6 +79,10 @@ QVariant WindowsHeapModel::headerData(int section, Qt::Orientation orientation, return tr("User Address"); case SizeColumn: return tr("Size"); + case GranularityColumn: + return tr("Granularity"); + case UnusedColumn: + return tr("Unused"); case TypeColumn: return tr("Type"); default: diff --git a/src/widgets/WindowsHeapWidget.h b/src/widgets/WindowsHeapWidget.h index c0118740..366037b0 100644 --- a/src/widgets/WindowsHeapWidget.h +++ b/src/widgets/WindowsHeapWidget.h @@ -15,7 +15,15 @@ class WindowsHeapModel : public QAbstractTableModel Q_OBJECT public: explicit WindowsHeapModel(QObject *parent = nullptr); - enum Column { HeaderAddColumn = 0, UserAddColumn, SizeColumn, TypeColumn, ColumnCount }; + enum Column { + HeaderAddColumn = 0, + UserAddColumn, + SizeColumn, + GranularityColumn, + UnusedColumn, + TypeColumn, + ColumnCount + }; void reload(); int rowCount(const QModelIndex &parent) const override; int columnCount(const QModelIndex &parent) const override;