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()); appTranslator.load(":/language/swisssurfer_"+ QLocale::system().name());
app.installTranslator(&appTranslator); app.installTranslator(&appTranslator);
//............................................................................ //............................................................................
if (env["PROXY_TYPE"]=="http")
QNetworkProxy::setApplicationProxy QNetworkProxy::setApplicationProxy
(QNetworkProxy (QNetworkProxy
((env["PROXY_TYPE"]=="http" (QNetworkProxy::HttpProxy,
? QNetworkProxy::HttpProxy
: (env["PROXY_TYPE"]=="socks"
? QNetworkProxy::Socks5Proxy
: QNetworkProxy::NoProxy)),
env["PROXY_HOST"], env["PROXY_PORT"].toInt())); 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()<<"***************************************************************";
qDebug()<<"Start - Proxy:" qDebug()<<"Start - Proxy:"
<<(QNetworkProxy::applicationProxy().type()==QNetworkProxy::NoProxy <<(QNetworkProxy::applicationProxy().type()==QNetworkProxy::NoProxy

Loading…
Cancel
Save