4
0
mirror of https://github.com/QuasarApp/installer-framework.git synced 2025-05-05 17:49:34 +00:00

Fix --no-proxy option in Windows

Task-number: QTIFW-1445
Change-Id: Iad02ecda0d5b27c3c9719f7c57e090d53a249be6
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
This commit is contained in:
Katja Marttila 2019-10-14 14:26:47 +03:00
parent 1b96174671
commit 730425abb0

@ -171,11 +171,11 @@ int InstallerBase::run()
// From Qt5.8 onwards a separate command line option --proxy is not needed as system
// proxy is used by default. If Qt is built with QT_USE_SYSTEM_PROXIES false
// then system proxies are not used by default.
if ((parser.isSet(QLatin1String(CommandLineOptions::Proxy))
#if QT_VERSION > 0x050800
|| QNetworkProxyFactory::usesSystemConfiguration()
#endif
) && !parser.isSet(QLatin1String(CommandLineOptions::NoProxy))) {
if (parser.isSet(QLatin1String(CommandLineOptions::NoProxy))) {
m_core->settings().setProxyType(QInstaller::Settings::NoProxy);
KDUpdater::FileDownloaderFactory::instance().setProxyFactory(m_core->proxyFactory());
} else if ((parser.isSet(QLatin1String(CommandLineOptions::Proxy))
|| QNetworkProxyFactory::usesSystemConfiguration())) {
m_core->settings().setProxyType(QInstaller::Settings::SystemProxy);
KDUpdater::FileDownloaderFactory::instance().setProxyFactory(m_core->proxyFactory());
}