mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Don't disable DHT/LSD/UPnP in the GUI when anonymous mode is enabled.
Conflicts: src/preferences/options_imp.cpp
This commit is contained in:
parent
5cb04f9b31
commit
037aaf752e
2 changed files with 0 additions and 23 deletions
|
@ -125,7 +125,6 @@ options_imp::options_imp(QWidget *parent):
|
||||||
|
|
||||||
// Connect signals / slots
|
// Connect signals / slots
|
||||||
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int)));
|
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int)));
|
||||||
connect(checkAnonymousMode, SIGNAL(toggled(bool)), this, SLOT(toggleAnonymousMode(bool)));
|
|
||||||
connect(checkRandomPort, SIGNAL(toggled(bool)), spinPort, SLOT(setDisabled(bool)));
|
connect(checkRandomPort, SIGNAL(toggled(bool)), spinPort, SLOT(setDisabled(bool)));
|
||||||
|
|
||||||
// Apply button is activated when a value is changed
|
// Apply button is activated when a value is changed
|
||||||
|
@ -744,8 +743,6 @@ void options_imp::loadOptions() {
|
||||||
comboEncryption->setCurrentIndex(pref.getEncryptionSetting());
|
comboEncryption->setCurrentIndex(pref.getEncryptionSetting());
|
||||||
#if LIBTORRENT_VERSION_NUM >= 1600
|
#if LIBTORRENT_VERSION_NUM >= 1600
|
||||||
checkAnonymousMode->setChecked(pref.isAnonymousModeEnabled());
|
checkAnonymousMode->setChecked(pref.isAnonymousModeEnabled());
|
||||||
/* make sure ui matches options */
|
|
||||||
toggleAnonymousMode(checkAnonymousMode->isChecked());
|
|
||||||
#endif
|
#endif
|
||||||
// Ratio limit
|
// Ratio limit
|
||||||
floatValue = pref.getGlobalMaxRatio();
|
floatValue = pref.getGlobalMaxRatio();
|
||||||
|
@ -1393,25 +1390,6 @@ void options_imp::setSslCertificate(const QByteArray &cert, bool interactive)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void options_imp::toggleAnonymousMode(bool enabled)
|
|
||||||
{
|
|
||||||
if (enabled) {
|
|
||||||
// Disable DHT, LSD, UPnP / NAT-PMP
|
|
||||||
checkDHT->setEnabled(false);
|
|
||||||
checkDifferentDHTPort->setEnabled(false);
|
|
||||||
checkDHT->setChecked(false);
|
|
||||||
checkLSD->setEnabled(false);
|
|
||||||
checkLSD->setChecked(false);
|
|
||||||
checkUPnP->setEnabled(false);
|
|
||||||
checkUPnP->setChecked(false);
|
|
||||||
} else {
|
|
||||||
checkDHT->setEnabled(true);
|
|
||||||
checkDifferentDHTPort->setEnabled(true);
|
|
||||||
checkLSD->setEnabled(true);
|
|
||||||
checkUPnP->setEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool options_imp::schedTimesOk() {
|
bool options_imp::schedTimesOk() {
|
||||||
QString msg;
|
QString msg;
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ private slots:
|
||||||
void on_btnWebUiKey_clicked();
|
void on_btnWebUiKey_clicked();
|
||||||
void on_registerDNSBtn_clicked();
|
void on_registerDNSBtn_clicked();
|
||||||
void setLocale(const QString &locale);
|
void setLocale(const QString &locale);
|
||||||
void toggleAnonymousMode(bool enabled);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue