Commit 64f26d3f authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

use http_proxy variable for proxy detection on linux

Reviewed-by: con
parent 7b043ba1
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QUrl>
#include <QtCore/QTextStream> #include <QtCore/QTextStream>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
#include <QtCore/QDebug> #include <QtCore/QDebug>
...@@ -221,8 +222,16 @@ int main(int argc, char **argv) ...@@ -221,8 +222,16 @@ int main(int argc, char **argv)
} }
// Make sure we honor the system's proxy settings // Make sure we honor the system's proxy settings
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
QUrl proxyUrl(QString::fromLatin1(qgetenv("http_proxy")));
if (proxyUrl.isValid()) {
QNetworkProxy proxy(QNetworkProxy::HttpCachingProxy, proxyUrl.host(),
proxyUrl.port(), proxyUrl.userName(), proxyUrl.password());
QNetworkProxy::setApplicationProxy(proxy);
}
#else
QNetworkProxyFactory::setUseSystemConfiguration(true); QNetworkProxyFactory::setUseSystemConfiguration(true);
#endif
// Load // Load
ExtensionSystem::PluginManager pluginManager; ExtensionSystem::PluginManager pluginManager;
pluginManager.setFileExtension(QLatin1String("pluginspec")); pluginManager.setFileExtension(QLatin1String("pluginspec"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment