App: (Re-)enable automatic HighDPI scaling for Linux

The original reason for disabling HighDPI scaling on Linux in
7da2b4a3cb was unhinted fonts for non-
scaled scenario: QTBUG-46435. That issue had been fixed long ago:
0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8

HighDPI support on Linux should by now be good enough to give it another
try by default.

Change-Id: I5b74f46310254c2916a2f16a7655d9f096453cc3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2017-05-12 18:35:18 +02:00
parent c9a9aadde7
commit 36c8227caf

View File

@@ -161,7 +161,7 @@ static const char *setHighDpiEnvironmentVariable()
{ {
const char* envVarName = 0; const char* envVarName = 0;
static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO"; static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO";
if (Utils::HostOsInfo().isWindowsHost() if (!Utils::HostOsInfo().isMacHost()
&& !qEnvironmentVariableIsSet(ENV_VAR_QT_DEVICE_PIXEL_RATIO) // legacy in 5.6, but still functional && !qEnvironmentVariableIsSet(ENV_VAR_QT_DEVICE_PIXEL_RATIO) // legacy in 5.6, but still functional
&& !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
&& !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")