summaryrefslogtreecommitdiffstats
path: root/src/sdk/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdk/main.cpp')
-rw-r--r--src/sdk/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp
index 70c675f91..819d512c2 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.
@@ -58,7 +58,13 @@ static const char PLACEHOLDER[32] = "MY_InstallerCreateDateTime_MY";
int main(int argc, char *argv[])
{
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#if defined(Q_OS_WIN)
+ if (!qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
+ && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
+ && !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ }
+#endif
// increase maximum numbers of file descriptors
#if defined (Q_OS_OSX)
QCoreApplication::setSetuidAllowed(true);
@@ -194,18 +200,12 @@ int main(int argc, char *argv[])
if (parser.isSet(QLatin1String(CommandLineOptions::Proxy))) {
// Make sure we honor the system's proxy settings
-#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
- QUrl proxyUrl(QString::fromLatin1(qgetenv("http_proxy")));
- if (proxyUrl.isValid()) {
- QNetworkProxy proxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyUrl.port(),
- proxyUrl.userName(), proxyUrl.password());
- QNetworkProxy::setApplicationProxy(proxy);
- }
-#else
QNetworkProxyFactory::setUseSystemConfiguration(true);
-#endif
}
+ if (parser.isSet(QLatin1String(CommandLineOptions::NoProxy)))
+ QNetworkProxyFactory::setUseSystemConfiguration(false);
+
if (parser.isSet(QLatin1String(CommandLineOptions::CheckUpdates)))
return UpdateChecker(argc, argv).check();