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>
bb10
Marc Mutz 2014-09-09 11:44:44 +02:00
parent d00dbb1bf2
commit 141ab966c5
1 changed files with 1 additions and 1 deletions

View File

@ -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: