Commit 4edec9f9 authored by con's avatar con

Workaround for Mac users with automatic proxy configuration

Qt's implementation for the Mac system configuration doesn't handle
automatic proxy configurations. Qt Creator now also looks at the
http_proxy environment variable on Mac as a workaround.

Task-number: QTCREATORBUG-4190
Reviewed-by: Daniel Molkentin
parent dbe32f89
......@@ -251,15 +251,18 @@ int main(int argc, char **argv)
}
// Make sure we honor the system's proxy settings
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#if defined(Q_OS_UNIX)
QUrl proxyUrl(QString::fromLatin1(qgetenv("http_proxy")));
if (proxyUrl.isValid()) {
QNetworkProxy proxy(QNetworkProxy::HttpProxy, proxyUrl.host(),
proxyUrl.port(), proxyUrl.userName(), proxyUrl.password());
QNetworkProxy::setApplicationProxy(proxy);
}
#else
QNetworkProxyFactory::setUseSystemConfiguration(true);
#if defined(Q_OS_MAC)
else {
QNetworkProxyFactory::setUseSystemConfiguration(true);
}
#endif
#endif
// Load
const QStringList pluginPaths = getPluginPaths();
......
Markdown is supported
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