summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformtheme.cpp
diff options
context:
space:
mode:
authorPelle Johnsen <pelle.johnsen@gmail.com>2014-08-20 11:16:43 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-08-21 17:53:52 +0200
commit4a2e297b4f091d212b184352fd2d3563c5ea5286 (patch)
tree42011280544cac66a55afca0ebd121d4a9e899fe /src/gui/kernel/qplatformtheme.cpp
parentf45efafacfc9c4e033dd6777bc9f985a76eedd66 (diff)
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>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.cpp')
-rw-r--r--src/gui/kernel/qplatformtheme.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index d3d3d3c222..d1b1106b28 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -508,7 +508,11 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
case MousePressAndHoldInterval:
return QVariant(800);
case MouseDoubleClickDistance:
- return QVariant(5);
+ {
+ bool ok = false;
+ int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok);
+ return QVariant(ok ? dist : 5);
+ }
}
return QVariant();
}