From c52239fa9609cce1806c88c49e4df39c3216d0ad Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 Sep 2014 11:48:49 +0200 Subject: QApplication: use qEnvironmentVariableIntValue() It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I3bd7b79b520ddbb9d4dd6adb3a495e214f111c2c Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index b73070b3ab..c913d83213 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -636,7 +636,7 @@ void QApplicationPrivate::initialize() qRegisterGuiStateMachine(); #endif - if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) + if (qEnvironmentVariableIntValue("QT_USE_NATIVE_WINDOWS") > 0) QCoreApplication::setAttribute(Qt::AA_NativeWindows); #ifdef Q_OS_WINCE -- cgit v1.2.3