mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-04-27 22:14:32 +00:00
Fix usage of system proxy with credentials
So far we've been using the entered credentials only for custom proxies on Windows and OS X. If one selected 'System Proxy' we asked or the credentials, but tried again without setting them. This fixes a regression introduced in 2.0, where we started to interactively ask for credentials. Task-number: QTBUG-46547 Change-Id: If059a9c68a0976db0453abdc795d9546c4b3aa4a Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
This commit is contained in:
parent
d343cd2041
commit
79a9d2e7d6
@ -1,6 +1,7 @@
|
||||
2.0.2
|
||||
- Fix .dat file that gets deleted after multiple component changes on Windows.
|
||||
- Fix maintenance tool upgrade on OS X.
|
||||
- Fix handling of system proxy with credentials. (QTBUG-46547)
|
||||
- Unify selection of language for translations. (QTIFW-390)
|
||||
- Fix return value of component.installAction() when updating. (QTIFW-727)
|
||||
- Documentation updates.
|
||||
|
@ -75,7 +75,19 @@ QList<QNetworkProxy> PackageManagerProxyFactory::queryProxy(const QNetworkProxyQ
|
||||
proxyUrl.userName(), proxyUrl.password());
|
||||
}
|
||||
#endif
|
||||
return QNetworkProxyFactory::systemProxyForQuery(query);
|
||||
QList<QNetworkProxy> systemProxies = systemProxyForQuery(query);
|
||||
|
||||
auto proxyIter = systemProxies.begin();
|
||||
for (; proxyIter != systemProxies.end(); ++proxyIter) {
|
||||
QNetworkProxy &proxy = *proxyIter;
|
||||
auto p = std::find_if(m_proxyCredentials.constBegin(), m_proxyCredentials.constEnd(),
|
||||
FindProxyCredential(proxy.hostName(), proxy.port()));
|
||||
if (p != m_proxyCredentials.constEnd()) {
|
||||
proxy.setUser(p->user);
|
||||
proxy.setPassword(p->password);
|
||||
}
|
||||
}
|
||||
return systemProxies;
|
||||
}
|
||||
|
||||
if ((settings.proxyType() == Settings::NoProxy))
|
||||
|
Loading…
x
Reference in New Issue
Block a user