aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-12-24 12:15:57 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-12-30 20:54:47 +0200
commit35007edf9c0f592303f0cbda3ade776c87fd80b1 (patch)
treeabf43a4913cb6e4e34032c59900e8e209654b2f0 /src/qt/peertablemodel.cpp
parentf1f26b8d5baec4a45a3a9ba0440cd4eff7af8407 (diff)
downloadbitcoin-35007edf9c0f592303f0cbda3ade776c87fd80b1.tar.xz
qt: Add PeerTableModel::StatsRole
This change allows access to CNodeCombinedStats instance directly from any view object.
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r--src/qt/peertablemodel.cpp5
1 files changed, 5 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();