Skip to content

Commit

Permalink
[Qt] remove unused timer-code from banlistmodel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Sep 16, 2015
1 parent e2b8028 commit 43c1f5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
19 changes: 1 addition & 18 deletions src/qt/bantablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <QDebug>
#include <QList>
#include <QTimer>

#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/c_local_time_adjustor.hpp>
Expand Down Expand Up @@ -65,33 +64,17 @@ class BanTablePriv

BanTableModel::BanTableModel(ClientModel *parent) :
QAbstractTableModel(parent),
clientModel(parent),
timer(0)
clientModel(parent)
{
columns << tr("IP/Netmask") << tr("Banned Until");
priv = new BanTablePriv();
// default to unsorted
priv->sortColumn = -1;

// set up timer for auto refresh
timer = new QTimer();
connect(timer, SIGNAL(timeout()), SLOT(refresh()));
timer->setInterval(MODEL_UPDATE_DELAY);

// load initial data
refresh();
}

void BanTableModel::startAutoRefresh()
{
timer->start();
}

void BanTableModel::stopAutoRefresh()
{
timer->stop();
}

int BanTableModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
Expand Down
5 changes: 0 additions & 5 deletions src/qt/bantablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
class ClientModel;
class BanTablePriv;

QT_BEGIN_NAMESPACE
class QTimer;
QT_END_NAMESPACE

struct CCombinedBan {
CSubNet subnet;
int64_t bantil;
Expand Down Expand Up @@ -59,7 +55,6 @@ public slots:
ClientModel *clientModel;
QStringList columns;
BanTablePriv *priv;
QTimer *timer;
};

#endif // BITCOIN_QT_BANTABLEMODEL_H

0 comments on commit 43c1f5b

Please sign in to comment.