diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2020-01-31 00:06:25 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2020-01-31 08:18:27 +0000 |
commit | 61eb058cc10592cfa314ba2209fb370706100e8b (patch) | |
tree | 0e117aaf9bd1d265320fdcaab016b18bec75b077 /src/qt | |
parent | 1d1f8bbf57118e01904448108a104e20f50d2544 (diff) |
gui: Drop BanTableModel dependency to ClientModel
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bantablemodel.cpp | 10 | ||||
-rw-r--r-- | src/qt/bantablemodel.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index d1ee7fac6a..72f16bb09f 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -6,12 +6,13 @@ #include <interfaces/node.h> #include <net_types.h> // For banmap_t -#include <qt/clientmodel.h> #include <utility> -#include <QDebug> +#include <QDateTime> #include <QList> +#include <QModelIndex> +#include <QVariant> bool BannedNodeLessThan::operator()(const CCombinedBan& left, const CCombinedBan& right) const { @@ -78,10 +79,9 @@ public: } }; -BanTableModel::BanTableModel(interfaces::Node& node, ClientModel *parent) : +BanTableModel::BanTableModel(interfaces::Node& node, QObject* parent) : QAbstractTableModel(parent), - m_node(node), - clientModel(parent) + m_node(node) { columns << tr("IP/Netmask") << tr("Banned Until"); priv.reset(new BanTablePriv()); diff --git a/src/qt/bantablemodel.h b/src/qt/bantablemodel.h index 9dec5fa6a9..f01c506a1e 100644 --- a/src/qt/bantablemodel.h +++ b/src/qt/bantablemodel.h @@ -12,7 +12,6 @@ #include <QAbstractTableModel> #include <QStringList> -class ClientModel; class BanTablePriv; namespace interfaces { @@ -45,7 +44,7 @@ class BanTableModel : public QAbstractTableModel Q_OBJECT public: - explicit BanTableModel(interfaces::Node& node, ClientModel *parent = nullptr); + explicit BanTableModel(interfaces::Node& node, QObject* parent); ~BanTableModel(); void startAutoRefresh(); void stopAutoRefresh(); @@ -72,7 +71,6 @@ public Q_SLOTS: private: interfaces::Node& m_node; - ClientModel *clientModel; QStringList columns; std::unique_ptr<BanTablePriv> priv; }; |