From 038d5651940cfcd9fad017e6a4df00389b997da3 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 1 Jun 2017 21:38:16 +0200 Subject: Let users disable the multi-touch support The newly added multi-touch support can create issues, especially together with Flickable that is unfortunately still not properly touch-compatible. The implementation is still based on synthesized mouse events, so things like Flickable::pressDelay that intercepts mouse presses and re-sends sends them after a delay, does not play well with touch-enabled controls. The easiest way we can disable the whole thing is to make multi- touch support a configurable feature, the same way hover support is. ./configure -no-feature-quicktemplates2-multitouch [...] Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... no [ChangeLog][Templates] Added a configure feature for disabling multi- touch support (configure -no-feature-quicktemplates2-multitouch). Task-number: QTBUG-61144 Change-Id: I0003ae925c2a499ecb3e2a5b720088bd963d9ad3 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickrangeslider.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/quicktemplates2/qquickrangeslider.cpp') diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp index 3d767ed7..276e8d0c 100644 --- a/src/quicktemplates2/qquickrangeslider.cpp +++ b/src/quicktemplates2/qquickrangeslider.cpp @@ -328,7 +328,9 @@ public: QQuickRangeSliderNode *pressedNode(int touchId = -1) const; +#if QT_CONFIG(quicktemplates2_multitouch) bool acceptTouch(const QTouchEvent::TouchPoint &point) override; +#endif void handlePress(const QPointF &point) override; void handleMove(const QPointF &point) override; void handleRelease(const QPointF &point) override; @@ -397,6 +399,7 @@ QQuickRangeSliderNode *QQuickRangeSliderPrivate::pressedNode(int touchId) const return nullptr; } +#if QT_CONFIG(quicktemplates2_multitouch) bool QQuickRangeSliderPrivate::acceptTouch(const QTouchEvent::TouchPoint &point) { int firstId = QQuickRangeSliderNodePrivate::get(first)->touchId; @@ -409,6 +412,7 @@ bool QQuickRangeSliderPrivate::acceptTouch(const QTouchEvent::TouchPoint &point) return false; } +#endif void QQuickRangeSliderPrivate::handlePress(const QPointF &point) { @@ -986,6 +990,7 @@ void QQuickRangeSlider::mouseMoveEvent(QMouseEvent *event) QQuickControl::mouseMoveEvent(event); } +#if QT_CONFIG(quicktemplates2_multitouch) void QQuickRangeSlider::touchEvent(QTouchEvent *event) { Q_D(QQuickRangeSlider); @@ -1023,6 +1028,7 @@ void QQuickRangeSlider::touchEvent(QTouchEvent *event) break; } } +#endif void QQuickRangeSlider::mirrorChange() { -- cgit v1.2.3