From 35007edf9c0f592303f0cbda3ade776c87fd80b1 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 24 Dec 2020 12:15:57 +0200 Subject: qt: Add PeerTableModel::StatsRole This change allows access to CNodeCombinedStats instance directly from any view object. --- src/qt/peertablemodel.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/qt/peertablemodel.h') 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; -- cgit v1.2.3