Skip to content

Commit ab1461d

Browse files
committed
qt: Add copy IP/Netmask action for banned peer
This adds a copy IP/Netmask context menu action for peers in the banned peer table
1 parent 201c5e4 commit ab1461d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,13 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
706706

707707
// create ban table context menu
708708
banTableContextMenu = new QMenu(this);
709+
/*: Context menu action to copy the IP/Netmask of a banned peer.
710+
IP/Netmask is the combination of a peer's IP address and its Netmask.
711+
For IP address see: https://en.wikipedia.org/wiki/IP_address */
712+
banTableContextMenu->addAction(tr("&Copy IP/Netmask"), [this] {
713+
GUIUtil::copyEntryData(ui->banlistWidget, BanTableModel::Address, Qt::DisplayRole);
714+
});
715+
banTableContextMenu->addSeparator();
709716
banTableContextMenu->addAction(tr("&Unban"), this, &RPCConsole::unbanSelectedNode);
710717
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);
711718

0 commit comments

Comments
 (0)