mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Merge pull request #7990 from Piccirello/subnet-whitelist-refactor
Refactor ip subnet whitelist
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user