mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Merge pull request #7990 from Piccirello/subnet-whitelist-refactor
Refactor ip subnet whitelist
This commit is contained in:
commit
0a45fc9ffe
5 changed files with 22 additions and 23 deletions
|
@ -71,12 +71,10 @@ void IPSubnetWhitelistOptionsDialog::on_buttonBox_accepted()
|
|||
{
|
||||
if (m_modified) {
|
||||
// save to session
|
||||
QList<Utils::Net::Subnet> subnets;
|
||||
QStringList subnets;
|
||||
// Operate on the m_sortFilter to grab the strings in sorted order
|
||||
for (int i = 0; i < m_sortFilter->rowCount(); ++i) {
|
||||
const QString subnet = m_sortFilter->index(i, 0).data().toString();
|
||||
subnets.append(QHostAddress::parseSubnet(subnet));
|
||||
}
|
||||
for (int i = 0; i < m_sortFilter->rowCount(); ++i)
|
||||
subnets.append(m_sortFilter->index(i, 0).data().toString());
|
||||
Preferences::instance()->setWebUiAuthSubnetWhitelist(subnets);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue