aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qt/peertablemodel.cpp5
-rw-r--r--src/qt/peertablemodel.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 2d7dbb38a3..5321c3f076 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -181,6 +181,11 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
default:
return QVariant();
}
+ } else if (role == StatsRole) {
+ switch (index.column()) {
+ case NetNodeId: return QVariant::fromValue(rec);
+ default: return QVariant();
+ }
}
return QVariant();
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index 61a0132e00..f70b7aeaa6 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -28,6 +28,7 @@ struct CNodeCombinedStats {
CNodeStateStats nodeStateStats;
bool fNodeStateStatsAvailable;
};
+Q_DECLARE_METATYPE(CNodeCombinedStats*)
class NodeLessThan
{
@@ -67,6 +68,10 @@ public:
Subversion = 6
};
+ enum {
+ StatsRole = Qt::UserRole,
+ };
+
/** @name Methods overridden from QAbstractTableModel
@{*/
int rowCount(const QModelIndex &parent) const override;