From 141ab966c5e8b0b811beb42433c8894ff33bde97 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 Sep 2014 11:44:44 +0200 Subject: [PATCH] QPlatformTheme: use qEnvironmentVariableIntValue() It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I78ced6a0207e3a9c6deb71c6ce097eb79fe5e8cf Reviewed-by: Gunnar Sletta --- src/gui/kernel/qplatformtheme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index fa9c7439ab..d4d8a7a3e8 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -502,7 +502,7 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) case MouseDoubleClickDistance: { bool ok = false; - int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok); + const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok); return QVariant(ok ? dist : 5); } case WheelScrollLines: