From 2114817890a23baaecc3e9254ec7712c1e94c84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= Date: Mon, 19 Feb 2018 21:35:23 +0000 Subject: [PATCH] Use qEnvironmentVariableIsEmpty Instead of qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty(). It's faster (don't allocate memory) and don't throw exceptions. --- src/app/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index a4df8fd75..37fa48a80 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -338,7 +338,7 @@ void showSplashScreen() #if defined(Q_OS_UNIX) void setupDpi() { - if (qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty()) + if (qEnvironmentVariableIsEmpty("QT_AUTO_SCREEN_SCALE_FACTOR")) qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); } #endif // Q_OS_UNIX