QGestureManager: use qEnvironmentVariableIntValue()

It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: I863593166db8eff4c4466996110f5cfdb758ec00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2015-10-19 00:14:56 +02:00
parent 948e88dab2
commit 037ba8d7af

View File

@ -66,7 +66,7 @@ static inline int panTouchPoints()
static const char panTouchPointVariable[] = "QT_PAN_TOUCHPOINTS";
if (qEnvironmentVariableIsSet(panTouchPointVariable)) {
bool ok;
const int result = qgetenv(panTouchPointVariable).toInt(&ok);
const int result = qEnvironmentVariableIntValue(panTouchPointVariable, &ok);
if (ok && result >= 1)
return result;
qWarning() << "Ignoring invalid value of " << panTouchPointVariable;