Browse Source

Don't disable DHT/LSD/UPnP in the GUI when anonymous mode is enabled.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
cd99f0ea43
  1. 20
      src/preferences/options_imp.cpp
  2. 1
      src/preferences/options_imp.h

20
src/preferences/options_imp.cpp

@ -125,7 +125,6 @@ options_imp::options_imp(QWidget *parent): @@ -125,7 +125,6 @@ options_imp::options_imp(QWidget *parent):
// Connect signals / slots
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)));
// Apply button is activated when a value is changed
@ -699,8 +698,6 @@ void options_imp::loadOptions() { @@ -699,8 +698,6 @@ void options_imp::loadOptions() {
checkLSD->setChecked(pref->isLSDEnabled());
comboEncryption->setCurrentIndex(pref->getEncryptionSetting());
checkAnonymousMode->setChecked(pref->isAnonymousModeEnabled());
/* make sure ui matches options */
toggleAnonymousMode(checkAnonymousMode->isChecked());
// Ratio limit
floatValue = pref->getGlobalMaxRatio();
if (floatValue >= 0.) {
@ -1327,23 +1324,6 @@ void options_imp::setSslCertificate(const QByteArray &cert, bool interactive) @@ -1327,23 +1324,6 @@ void options_imp::setSslCertificate(const QByteArray &cert, bool interactive)
#endif
}
void options_imp::toggleAnonymousMode(bool enabled)
{
if (enabled) {
// Disable DHT, LSD, UPnP / NAT-PMP
checkDHT->setEnabled(false);
checkDHT->setChecked(false);
checkLSD->setEnabled(false);
checkLSD->setChecked(false);
checkUPnP->setEnabled(false);
checkUPnP->setChecked(false);
} else {
checkDHT->setEnabled(true);
checkLSD->setEnabled(true);
checkUPnP->setEnabled(true);
}
}
bool options_imp::schedTimesOk() {
QString msg;

1
src/preferences/options_imp.h

@ -85,7 +85,6 @@ private slots: @@ -85,7 +85,6 @@ private slots:
void on_btnWebUiKey_clicked();
void on_registerDNSBtn_clicked();
void setLocale(const QString &locale);
void toggleAnonymousMode(bool enabled);
private:
// Methods

Loading…
Cancel
Save