summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-01-29 10:44:50 +0200
committerKatja Marttila <katja.marttila@qt.io>2018-01-30 07:04:43 +0000
commit677f055115188978e7ed7abbbf26c9f438fc48b2 (patch)
treef68fda7845db462efeccf0a4e6a44b193208394c /src/sdk
parentc0ac15295e22ba6c3fdd403bad5a179af163575b (diff)
Fix usesSystemConfiguration usage
As usesSystemConfiguration() is introduced in Qt 5.8, use it only when compiling with Qt 5.8 or higher. IFW still supports version 5.6.2. Change-Id: Ib39f38a452624a84627ad53c9941154bc0fd7929 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/installerbase.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index df608e66e..6004d286e 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -167,9 +167,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)) ||
- QNetworkProxyFactory::usesSystemConfiguration()) &&
- !parser.isSet(QLatin1String(CommandLineOptions::NoProxy))){
+ if ((parser.isSet(QLatin1String(CommandLineOptions::Proxy))
+#if QT_VERSION > 0x050800
+ || QNetworkProxyFactory::usesSystemConfiguration()
+#endif
+ ) && !parser.isSet(QLatin1String(CommandLineOptions::NoProxy))) {
m_core->settings().setProxyType(QInstaller::Settings::SystemProxy);
KDUpdater::FileDownloaderFactory::instance().setProxyFactory(m_core->proxyFactory());
}