Skip to content

Commit

Permalink
gui: Drop PeerTableModel dependency to ClientModel
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Feb 3, 2020
1 parent 651e343 commit ff59bcd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/qt/peertablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <qt/peertablemodel.h>

#include <qt/clientmodel.h>
#include <qt/guiconstants.h>
#include <qt/guiutil.h>

Expand Down Expand Up @@ -100,10 +99,9 @@ class PeerTablePriv
}
};

PeerTableModel::PeerTableModel(interfaces::Node& node, ClientModel *parent) :
PeerTableModel::PeerTableModel(interfaces::Node& node, QObject* parent) :
QAbstractTableModel(parent),
m_node(node),
clientModel(parent),
timer(nullptr)
{
columns << tr("NodeId") << tr("Node/Service") << tr("Ping") << tr("Sent") << tr("Received") << tr("User Agent");
Expand Down
4 changes: 1 addition & 3 deletions src/qt/peertablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <QAbstractTableModel>
#include <QStringList>

class ClientModel;
class PeerTablePriv;

namespace interfaces {
Expand Down Expand Up @@ -51,7 +50,7 @@ class PeerTableModel : public QAbstractTableModel
Q_OBJECT

public:
explicit PeerTableModel(interfaces::Node& node, ClientModel *parent = nullptr);
explicit PeerTableModel(interfaces::Node& node, QObject* parent);
~PeerTableModel();
const CNodeCombinedStats *getNodeStats(int idx);
int getRowByNodeId(NodeId nodeid);
Expand Down Expand Up @@ -83,7 +82,6 @@ public Q_SLOTS:

private:
interfaces::Node& m_node;
ClientModel *clientModel;
QStringList columns;
std::unique_ptr<PeerTablePriv> priv;
QTimer *timer;
Expand Down
1 change: 0 additions & 1 deletion test/lint/lint-circular-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
"policy/fees -> txmempool -> policy/fees"
"qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel"
"qt/bitcoingui -> qt/walletframe -> qt/bitcoingui"
"qt/clientmodel -> qt/peertablemodel -> qt/clientmodel"
"qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel"
"qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog"
"qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel"
Expand Down

0 comments on commit ff59bcd

Please sign in to comment.