summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-09 11:44:44 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-10-02 16:00:02 +0200
commit141ab966c5e8b0b811beb42433c8894ff33bde97 (patch)
tree8d6b98c731038ca54554ed3e129b0b163068acbd /src/gui/kernel
parentd00dbb1bf2f3284d9a18080e984fa69a13f3167c (diff)
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 <gunnar@sletta.org>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformtheme.cpp2
1 files changed, 1 insertions, 1 deletions
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: