Browse Source

Merge #9266: Bugfix: Qt/RPCConsole: Put column enum in the right places

df17fe0 Bugfix: Qt/RPCConsole: Put column enum in the right places (Luke Dashjr)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
2044e37beb
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 12
      src/qt/rpcconsole.cpp

12
src/qt/rpcconsole.cpp

@ -1008,11 +1008,11 @@ void RPCConsole::disconnectSelectedNode() @@ -1008,11 +1008,11 @@ void RPCConsole::disconnectSelectedNode()
return;
// Get selected peer addresses
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, 0);
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId);
for(int i = 0; i < nodes.count(); i++)
{
// Get currently selected peer address
NodeId id = nodes.at(i).data(PeerTableModel::NetNodeId).toInt();
NodeId id = nodes.at(i).data().toInt();
// Find the node, disconnect it and clear the selected node
if(g_connman->DisconnectNode(id))
clearSelectedNode();
@ -1025,11 +1025,11 @@ void RPCConsole::banSelectedNode(int bantime) @@ -1025,11 +1025,11 @@ void RPCConsole::banSelectedNode(int bantime)
return;
// Get selected peer addresses
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, 0);
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId);
for(int i = 0; i < nodes.count(); i++)
{
// Get currently selected peer address
NodeId id = nodes.at(i).data(PeerTableModel::NetNodeId).toInt();
NodeId id = nodes.at(i).data().toInt();
// Get currently selected peer address
int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
@ -1052,11 +1052,11 @@ void RPCConsole::unbanSelectedNode() @@ -1052,11 +1052,11 @@ void RPCConsole::unbanSelectedNode()
return;
// Get selected ban addresses
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->banlistWidget, 0);
QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->banlistWidget, BanTableModel::Address);
for(int i = 0; i < nodes.count(); i++)
{
// Get currently selected ban address
QString strNode = nodes.at(i).data(BanTableModel::Address).toString();
QString strNode = nodes.at(i).data().toString();
CSubNet possibleSubnet;
LookupSubNet(strNode.toStdString().c_str(), possibleSubnet);

Loading…
Cancel
Save