From bdb625a615f691327994cd46403a1f29fc6e8af9 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 27 Nov 2007 19:37:45 +0000 Subject: [PATCH] - Fixed compilation on windows (closes #172391) --- src/GUI.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/GUI.cpp b/src/GUI.cpp index 1bea5b981..664968e81 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -882,10 +882,20 @@ void GUI::configureSession(bool deleteOptions) { } if(!proxy_str.isEmpty()) { // We need this for urllib in search engine plugins +#ifdef Q_WS_WIN + char proxystr[512]; + snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toUtf8().data()); + putenv(proxystr); +#else setenv("http_proxy", proxy_str.toUtf8().data(), 1); +#endif } } else { +#ifdef Q_WS_WIN + putenv("http_proxy="); +#else unsetenv("http_proxy"); +#endif } BTSession->setProxySettings(proxySettings, options->useProxyForTrackers(), options->useProxyForPeers(), options->useProxyForWebseeds(), options->useProxyForDHT()); // * Session settings