From de3b2b6493c810380e961bb8b36b805a505b55b7 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Date: Wed, 19 Aug 2015 09:54:26 +0200
Subject: [PATCH] Limit legacy Highdpi tweaks to Qt versions < 5.6.

As of Qt 5.6, Qt will scale automatically. The font hinting
issues on non-Windows OS should also be fixed.
This silences the warning about using the legacy
QT_DEVICE_PIXEL_RATIO variable.

Change-Id: Icc78d990fae67bbd39a57fa1f5b08c592dc9e2ce
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
---
 src/app/main.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/app/main.cpp b/src/app/main.cpp
index d2fa179bdd1..3e9a5238232 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -292,10 +292,13 @@ static inline QSettings *userSettings()
 
 int main(int argc, char **argv)
 {
+#if (QT_VERSION < QT_VERSION_CHECK(5, 6, 0))
     if (Utils::HostOsInfo().isWindowsHost()
             && !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) {
         qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
     }
+#endif // < Qt 5.6
+
     QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
 #ifdef Q_OS_MAC
     // increase the number of file that can be opened in Qt Creator.
-- 
GitLab