support reading of default value for startDragDistance property
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Mon, 14 Sep 2020 13:56:35 +0000 (14:56 +0100)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Mon, 14 Sep 2020 13:56:35 +0000 (14:56 +0100)
from QT_USE_DRAG_DISTANCE environment variable.
See also http://bugreports.qt.nokia.com/browse/QTBUG-12594
Author: Joonas Tanskanen <joonas.tanskanen@sasken.com>

Gbp-Pq: Name Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch

src/gui/kernel/qapplication.cpp

index 22da34e0154a5b37566f38c514648a9125ee5771..5cc57b0f836906a3fea4b75cb2a6a2208eacdd64 100644 (file)
@@ -1031,6 +1031,11 @@ void QApplicationPrivate::initialize()
     q->setAttribute(Qt::AA_S60DisablePartialScreenInputMode);
 #endif
 
+    if(qgetenv("QT_USE_DRAG_DISTANCE").toInt() > 0) {
+        int dragThreshold = qgetenv("QT_USE_DRAG_DISTANCE").toInt();
+        q->setStartDragDistance(dragThreshold);
+    }
+
     if (qt_is_gui_used)
         initializeMultitouch();
 }