Replacement for QWS_DBLCLICK_DISTANCE

Add QT_DBL_CLICK_DIST to replace QWS_DBLCLICK_DISTANCE for controlling
the distance for detecting double clicks, which can be very useful on
embedded devices

[ChangeLog][QtGui] environment variable QT_DBL_CLICK_DIST 
customizes the amount of movement allowed when detecting a double click.

Task-number: QTBUG-40841
Change-Id: I0a7534ad6cd6387d127eb49021a92d414d45670e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Pelle Johnsen 2014-08-20 11:16:43 +02:00 committed by Shawn Rutledge
parent f45efafacf
commit 4a2e297b4f

View File

@ -508,7 +508,11 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
case MousePressAndHoldInterval: case MousePressAndHoldInterval:
return QVariant(800); return QVariant(800);
case MouseDoubleClickDistance: case MouseDoubleClickDistance:
return QVariant(5); {
bool ok = false;
int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok);
return QVariant(ok ? dist : 5);
}
} }
return QVariant(); return QVariant();
} }