aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-04-24 12:49:49 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-04-28 13:25:39 +0000
commit8082698fff3ee87d0dfc75cdba0ae21ec523a3fe (patch)
treee58d6f1b4b1f83c7b46d47dbad7f482ac34b26db /src/quick/handlers
parent4c84de4a93b0cdc116d67173eb5d8e7926fe3311 (diff)
QQPSingleHandler: accept only left mouse button by default
It makes as much sense for DragHandler as it does for TapHandler. If you want to allow right-button dragging, you need to enable it in QML. In general, UIs have always relied on the left button for normal interaction, while the other buttons are for special cases. Change-Id: I708d5d080832c32ef581ca333c9be06e987ef007 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r--src/quick/handlers/qquickpointersinglehandler.cpp2
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/handlers/qquickpointersinglehandler.cpp b/src/quick/handlers/qquickpointersinglehandler.cpp
index dca98f6a50..4e89d71eab 100644
--- a/src/quick/handlers/qquickpointersinglehandler.cpp
+++ b/src/quick/handlers/qquickpointersinglehandler.cpp
@@ -55,7 +55,7 @@ QQuickPointerSingleHandler::QQuickPointerSingleHandler(QObject *parent)
, m_pointId(0)
, m_rotation(0)
, m_pressure(0)
- , m_acceptedButtons(Qt::AllButtons)
+ , m_acceptedButtons(Qt::LeftButton)
, m_ignoreAdditionalPoints(false)
{
}
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index bf9a72c5ab..c0a0dd8379 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -85,7 +85,6 @@ QQuickTapHandler::QQuickTapHandler(QObject *parent)
, m_longPressThreshold(-1)
, m_lastTapTimestamp(0.0)
{
- setAcceptedButtons(Qt::LeftButton);
if (m_mouseMultiClickDistanceSquared < 0) {
m_multiTapInterval = qApp->styleHints()->mouseDoubleClickInterval() / 1000.0;
m_mouseMultiClickDistanceSquared = QGuiApplicationPrivate::platformTheme()->