summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-01-23 08:56:02 +0200
committerKatja Marttila <katja.marttila@qt.io>2018-01-25 10:53:31 +0000
commite3ddb89442eeb6a085456363216b982e466f9626 (patch)
tree2eb2dd0a95d06f6f84be125df3ec37f0e9cc0aba
parent17884d41ae731b5119f4ba35d9b15b994a80b6e1 (diff)
Set correct proxy type
From Qt 5.8 onwards system proxy might be used by default. Checked if that is the case and updated settings accordingly. Task-number: QTBUG-65143 Change-Id: Ibe8f3173636c57f73addcc576afdd37a68ec1d03 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--doc/installerfw-using.qdoc7
-rw-r--r--src/sdk/installerbase.cpp9
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/installerfw-using.qdoc b/doc/installerfw-using.qdoc
index 36df3bed9..178957dbd 100644
--- a/doc/installerfw-using.qdoc
+++ b/doc/installerfw-using.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -349,9 +349,8 @@
\section1 Specifying Proxy Settings
- By default, the installer does not use any proxy settings. End users can
- select to use the system proxy settings or specify the proxy settings
- manually.
+ By default, the installer uses system proxy settings. End users can
+ select to use no proxy or specify the proxy settings manually.
\image ifw-settings-network.png "Network tab on Settings page"
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index ffcd8b388..df608e66e 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -164,7 +164,12 @@ int InstallerBase::run()
+ m_core->settings().controlScript();
}
- if (parser.isSet(QLatin1String(CommandLineOptions::Proxy))) {
+ // 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))){
m_core->settings().setProxyType(QInstaller::Settings::SystemProxy);
KDUpdater::FileDownloaderFactory::instance().setProxyFactory(m_core->proxyFactory());
}