mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Allow to select multiple entries in "banned IP" dialog
This commit is contained in:
@@ -107,8 +107,12 @@ void BanListOptionsDialog::on_buttonBanIP_clicked()
|
||||
|
||||
void BanListOptionsDialog::on_buttonDeleteIP_clicked()
|
||||
{
|
||||
const QModelIndexList selection = m_ui->bannedIPList->selectionModel()->selectedIndexes();
|
||||
for (const auto &i : selection)
|
||||
QModelIndexList selection = m_ui->bannedIPList->selectionModel()->selectedIndexes();
|
||||
std::sort(selection.begin(), selection.end(), [](const QModelIndex &left, const QModelIndex &right)
|
||||
{
|
||||
return (left.row() > right.row());
|
||||
});
|
||||
for (const QModelIndex &i : selection)
|
||||
m_sortFilter->removeRow(i.row());
|
||||
|
||||
m_modified = true;
|
||||
|
||||
Reference in New Issue
Block a user