From 677f055115188978e7ed7abbbf26c9f438fc48b2 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 29 Jan 2018 10:44:50 +0200 Subject: 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 --- src/sdk/installerbase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/sdk') 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()); } -- cgit v1.2.3