- Can have different proxy settings for bittorrent and search engine (closes #274791)

This commit is contained in:
Christophe Dumez 2008-09-27 09:12:41 +00:00
parent 2931d51add
commit 139360cf76
60 changed files with 3322 additions and 2683 deletions

View file

@ -974,15 +974,12 @@ void GUI::configureSession(bool deleteOptions) {
proxySettings.username = options->getProxyUsername().toStdString();
proxySettings.password = options->getProxyPassword().toStdString();
}
QString proxy_str;
switch(options->getProxyType()) {
case HTTP:
proxySettings.type = proxy_settings::http;
proxy_str = misc::toQString("http://")+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
break;
case HTTP_PW:
proxySettings.type = proxy_settings::http_pw;
proxy_str = misc::toQString("http://")+options->getProxyUsername()+":"+options->getProxyPassword()+"@"+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
break;
case SOCKS5:
proxySettings.type = proxy_settings::socks5;
@ -991,6 +988,14 @@ void GUI::configureSession(bool deleteOptions) {
proxySettings.type = proxy_settings::socks5_pw;
break;
}
QString proxy_str;
switch(options->getHTTPProxyType()) {
case HTTP_PW:
proxy_str = misc::toQString("http://")+options->getProxyUsername()+":"+options->getProxyPassword()+"@"+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
break;
default:
proxy_str = misc::toQString("http://")+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
}
if(!proxy_str.isEmpty()) {
// We need this for urllib in search engine plugins
#ifdef Q_WS_WIN