@@ -975,11 +975,11 @@ void RPCConsole::disconnectSelectedNode()
975
975
return ;
976
976
977
977
// Get selected peer addresses
978
- QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->peerWidget , 0 );
978
+ QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->peerWidget , PeerTableModel::NetNodeId );
979
979
for (int i = 0 ; i < nodes.count (); i++)
980
980
{
981
981
// Get currently selected peer address
982
- NodeId id = nodes.at (i).data (PeerTableModel::NetNodeId ).toInt ();
982
+ NodeId id = nodes.at (i).data ().toInt ();
983
983
// Find the node, disconnect it and clear the selected node
984
984
if (g_connman->DisconnectNode (id))
985
985
clearSelectedNode ();
@@ -992,11 +992,11 @@ void RPCConsole::banSelectedNode(int bantime)
992
992
return ;
993
993
994
994
// Get selected peer addresses
995
- QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->peerWidget , 0 );
995
+ QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->peerWidget , PeerTableModel::NetNodeId );
996
996
for (int i = 0 ; i < nodes.count (); i++)
997
997
{
998
998
// Get currently selected peer address
999
- NodeId id = nodes.at (i).data (PeerTableModel::NetNodeId ).toInt ();
999
+ NodeId id = nodes.at (i).data ().toInt ();
1000
1000
1001
1001
// Get currently selected peer address
1002
1002
int detailNodeRow = clientModel->getPeerTableModel ()->getRowByNodeId (id);
@@ -1019,11 +1019,11 @@ void RPCConsole::unbanSelectedNode()
1019
1019
return ;
1020
1020
1021
1021
// Get selected ban addresses
1022
- QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->banlistWidget , 0 );
1022
+ QList<QModelIndex> nodes = GUIUtil::getEntryData (ui->banlistWidget , BanTableModel::Address );
1023
1023
for (int i = 0 ; i < nodes.count (); i++)
1024
1024
{
1025
1025
// Get currently selected ban address
1026
- QString strNode = nodes.at (i).data (BanTableModel::Address ).toString ();
1026
+ QString strNode = nodes.at (i).data ().toString ();
1027
1027
CSubNet possibleSubnet;
1028
1028
1029
1029
LookupSubNet (strNode.toStdString ().c_str (), possibleSubnet);
0 commit comments