mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Add checkbox option for IpFilterTrackers, closes #3154.
This commit is contained in:
parent
77786bb8bb
commit
32a712f005
5 changed files with 3213 additions and 28 deletions
|
@ -226,6 +226,7 @@ options_imp::options_imp(QWidget *parent):
|
|||
connect(textProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
// Misc tab
|
||||
connect(checkIPFilter, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkIpFilterTrackers, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
|
||||
connect(textFilterPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(checkEnableQueueing, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(spinMaxActiveDownloads, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
|
@ -455,8 +456,10 @@ void options_imp::saveOptions() {
|
|||
// Misc preferences
|
||||
// * IPFilter
|
||||
pref->setFilteringEnabled(isFilteringEnabled());
|
||||
if (isFilteringEnabled())
|
||||
if (isFilteringEnabled()) {
|
||||
pref->setFilteringTrackerEnabled(checkIpFilterTrackers->isChecked());
|
||||
pref->setFilter(textFilterPath->text());
|
||||
}
|
||||
// End IPFilter preferences
|
||||
// Queueing system
|
||||
pref->setQueueingSystemEnabled(isQueueingSystemEnabled());
|
||||
|
@ -762,6 +765,7 @@ void options_imp::loadOptions() {
|
|||
// Misc preferences
|
||||
// * IP Filter
|
||||
checkIPFilter->setChecked(pref->isFilteringEnabled());
|
||||
checkIpFilterTrackers->setChecked(pref->isFilteringTrackerEnabled());
|
||||
textFilterPath->setText(Utils::Fs::toNativePath(pref->getFilter()));
|
||||
// End IP Filter
|
||||
// Queueing system preferences
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue