Browse Source

- Fix for HTTP Proxy settings

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
c786c42bb1
  1. 14
      src/options_imp.cpp

14
src/options_imp.cpp

@ -333,17 +333,17 @@ void options_imp::saveOptions(){
settings.setValue(QString::fromUtf8("AffectDHT"), useProxyForDHT()); settings.setValue(QString::fromUtf8("AffectDHT"), useProxyForDHT());
settings.endGroup(); // End Proxy settings.endGroup(); // End Proxy
} }
settings.setValue(QString::fromUtf8("HTTPProxyType"), getProxyType()); settings.setValue(QString::fromUtf8("HTTPProxyType"), getHTTPProxyType());
if(isProxyEnabled()) { if(isProxyEnabled()) {
settings.beginGroup("HTTPProxy"); settings.beginGroup("HTTPProxy");
// Proxy is enabled, save settings // Proxy is enabled, save settings
settings.setValue(QString::fromUtf8("IP"), getProxyIp()); settings.setValue(QString::fromUtf8("IP"), getHTTPProxyIp());
settings.setValue(QString::fromUtf8("Port"), getProxyPort()); settings.setValue(QString::fromUtf8("Port"), getHTTPProxyPort());
settings.setValue(QString::fromUtf8("Authentication"), isProxyAuthEnabled()); settings.setValue(QString::fromUtf8("Authentication"), isHTTPProxyAuthEnabled());
if(isProxyAuthEnabled()) { if(isProxyAuthEnabled()) {
// Credentials // Credentials
settings.setValue(QString::fromUtf8("Username"), getProxyUsername()); settings.setValue(QString::fromUtf8("Username"), getHTTPProxyUsername());
settings.setValue(QString::fromUtf8("Password"), getProxyPassword()); settings.setValue(QString::fromUtf8("Password"), getHTTPProxyPassword());
} }
settings.endGroup(); // End HTTPProxy settings.endGroup(); // End HTTPProxy
} }
@ -588,7 +588,7 @@ void options_imp::loadOptions(){
} }
comboProxyType_http->setCurrentIndex(intValue); comboProxyType_http->setCurrentIndex(intValue);
enableProxyHTTP(intValue); enableProxyHTTP(intValue);
if(isProxyEnabled()) { if(isHTTPProxyEnabled()) {
settings.beginGroup("HTTPProxy"); settings.beginGroup("HTTPProxy");
// Proxy is enabled, save settings // Proxy is enabled, save settings
textProxyIP_http->setText(settings.value(QString::fromUtf8("IP"), "0.0.0.0").toString()); textProxyIP_http->setText(settings.value(QString::fromUtf8("IP"), "0.0.0.0").toString());

Loading…
Cancel
Save