diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sdk/commandlineparser.cpp | 5 | ||||
-rw-r--r-- | src/sdk/constants.h | 3 | ||||
-rw-r--r-- | src/sdk/main.cpp | 5 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp index fbaa91328..2f1568786 100644 --- a/src/sdk/commandlineparser.cpp +++ b/src/sdk/commandlineparser.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. @@ -53,6 +53,9 @@ CommandLineParser::CommandLineParser() m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Proxy), QLatin1String("Use system proxy on Windows and Linux. This option has no effect on OS X."))); + m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::NoProxy), + QLatin1String("Do not use system proxy."))); + m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Script), QLatin1String("Execute the script given as argument."), QLatin1String("file"))); diff --git a/src/sdk/constants.h b/src/sdk/constants.h index ce447ac4b..d46af2db4 100644 --- a/src/sdk/constants.h +++ b/src/sdk/constants.h @@ -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. @@ -38,6 +38,7 @@ const char FrameworkVersion[] = "framework-version"; const char VerboseShort[] = "v"; const char VerboseLong[] = "verbose"; const char Proxy[] = "proxy"; +const char NoProxy[] = "no-proxy"; const char Script[] = "script"; const char CheckUpdates[] = "checkupdates"; const char Updater[] = "updater"; diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp index 46165b214..4485d9ce2 100644 --- a/src/sdk/main.cpp +++ b/src/sdk/main.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. @@ -212,6 +212,9 @@ int main(int argc, char *argv[]) #endif } + if (parser.isSet(QLatin1String(CommandLineOptions::NoProxy))) + QNetworkProxyFactory::setUseSystemConfiguration(false); + if (parser.isSet(QLatin1String(CommandLineOptions::CheckUpdates))) return UpdateChecker(argc, argv).check(); |