master
Marc Wäckerlin 14 years ago
parent 327b889eea
commit 8330279064
  1. 14
      swisssurfer/src/main.cxx

@ -175,14 +175,18 @@ int main(int argv, char** argc) try {
appTranslator.load(":/language/swisssurfer_"+ QLocale::system().name());
app.installTranslator(&appTranslator);
//............................................................................
if (env["PROXY_TYPE"]=="http")
QNetworkProxy::setApplicationProxy
(QNetworkProxy
((env["PROXY_TYPE"]=="http"
? QNetworkProxy::HttpProxy
: (env["PROXY_TYPE"]=="socks"
? QNetworkProxy::Socks5Proxy
: QNetworkProxy::NoProxy)),
(QNetworkProxy::HttpProxy,
env["PROXY_HOST"], env["PROXY_PORT"].toInt()));
if (env["PROXY_TYPE"]=="socks")
QNetworkProxy::setApplicationProxy
(QNetworkProxy
(QNetworkProxy::Socks5Proxy,
env["PROXY_HOST"], env["PROXY_PORT"].toInt()));
else
QNetworkProxyFactory::setUseSystemConfiguration(true);
qDebug()<<"***************************************************************";
qDebug()<<"Start - Proxy:"
<<(QNetworkProxy::applicationProxy().type()==QNetworkProxy::NoProxy

Loading…
Cancel
Save