mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-20 04:36:08 +01:00
[Qt] disconnect peers from peers tab via context menu
- It is now allowed to disconnect peers from peers tab via right-click context menu. Peers are not permanently banned!
This commit is contained in:
@@ -265,6 +265,19 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
|
||||
}
|
||||
}
|
||||
|
||||
QString getEntryData(QAbstractItemView *view, int column, int role)
|
||||
{
|
||||
if(!view || !view->selectionModel())
|
||||
return QString();
|
||||
QModelIndexList selection = view->selectionModel()->selectedRows(column);
|
||||
|
||||
if(!selection.isEmpty()) {
|
||||
// Return first item
|
||||
return (selection.at(0).data(role).toString());
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
|
||||
const QString &filter,
|
||||
QString *selectedSuffixOut)
|
||||
|
||||
Reference in New Issue
Block a user