aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <[email protected]>2015-07-29 14:34:14 +0200
committerJonas Schnelli <[email protected]>2015-09-16 16:50:20 +0200
commit7f90ea78cb68c60408df85d5c653257dbc9160fe (patch)
tree98afbb661db8de879314d7c46faeea57cb559942 /src
parent[QA] fix netbase tests because of new CSubNet::ToString() output (diff)
downloaddiscoin-7f90ea78cb68c60408df85d5c653257dbc9160fe.tar.xz
discoin-7f90ea78cb68c60408df85d5c653257dbc9160fe.zip
[QA] adabt QT_NO_KEYWORDS for QT ban implementation
Diffstat (limited to 'src')
-rw-r--r--src/qt/bantablemodel.cpp10
-rw-r--r--src/qt/bantablemodel.h2
-rw-r--r--src/qt/rpcconsole.cpp5
3 files changed, 8 insertions, 9 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp
index 42542371e..33792af5b 100644
--- a/src/qt/bantablemodel.cpp
+++ b/src/qt/bantablemodel.cpp
@@ -54,11 +54,11 @@ public:
#if QT_VERSION >= 0x040700
cachedBanlist.reserve(banMap.size());
#endif
- foreach (const PAIRTYPE(CSubNet, CBanEntry)& banentry, banMap)
+ for (banmap_t::iterator it = banMap.begin(); it != banMap.end(); it++)
{
CCombinedBan banEntry;
- banEntry.subnet = banentry.first;
- banEntry.banEntry = banentry.second;
+ banEntry.subnet = (*it).first;
+ banEntry.banEntry = (*it).second;
cachedBanlist.append(banEntry);
}
@@ -161,9 +161,9 @@ QModelIndex BanTableModel::index(int row, int column, const QModelIndex &parent)
void BanTableModel::refresh()
{
- emit layoutAboutToBeChanged();
+ Q_EMIT layoutAboutToBeChanged();
priv->refreshBanlist();
- emit layoutChanged();
+ Q_EMIT layoutChanged();
}
void BanTableModel::sort(int column, Qt::SortOrder order)
diff --git a/src/qt/bantablemodel.h b/src/qt/bantablemodel.h
index 09eb468fb..c21dd04e3 100644
--- a/src/qt/bantablemodel.h
+++ b/src/qt/bantablemodel.h
@@ -60,7 +60,7 @@ public:
bool shouldShow();
/*@}*/
-public slots:
+public Q_SLOTS:
void refresh();
private:
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 4dc976028..b3c28eab8 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -27,6 +27,7 @@
#include <QKeyEvent>
#include <QMenu>
#include <QScrollBar>
+#include <QSignalMapper>
#include <QThread>
#include <QTime>
#include <QTimer>
@@ -242,7 +243,7 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
clientModel(0),
historyPtr(0),
cachedNodeid(-1),
- platformStyle(platformStyle)
+ platformStyle(platformStyle),
peersTableContextMenu(0),
banTableContextMenu(0)
{
@@ -807,7 +808,6 @@ void RPCConsole::banSelectedNode(int bantime)
SplitHostPort(nStr, port, addr);
CNode::Ban(CNetAddr(addr), BanReasonManuallyAdded, bantime);
- DumpBanlist(); // store banlist to disk
bannedNode->fDisconnect = true;
clearSelectedNode();
@@ -827,7 +827,6 @@ void RPCConsole::unbanSelectedNode()
if (possibleSubnet.IsValid())
{
CNode::Unban(possibleSubnet);
- DumpBanlist(); // store banlist to disk
clientModel->getBanTableModel()->refresh();
}
}