diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-15 14:35:56 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-17 09:59:54 +0000 |
commit | b1909ca4d1d80c36601eb942459db3ff60174c8e (patch) | |
tree | c4780a720ef7c71c6b1622e70f9abadba77bdb55 /src | |
parent | aa1a8444991aee671981a99d1e08c5e1cb02c94a (diff) |
QQuickSpinBox: fix auto-repeat
Don't cancel auto-repeat on the tiniest mouse/touch move, but keep
repeating until moved outside the button.
The test has been written so that the exact amount of repeats does
not matter, as long as it repeats. This is because waits are not
reliable in a busy CI environment. Sometimes waits can take longer,
timer events get queued, and we get an unexpected burst of repeats.
Change-Id: Ibdcdd9e684bbcda032abfabb8a33ed892c7778df
Task-number: QTBUG-57085
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickspinbox.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp index 79ec5da0..473b6643 100644 --- a/src/quicktemplates2/qquickspinbox.cpp +++ b/src/quicktemplates2/qquickspinbox.cpp @@ -242,7 +242,8 @@ bool QQuickSpinBoxPrivate::handleMouseMoveEvent(QQuickItem *child, QMouseEvent * bool pressed = up->isPressed() || down->isPressed(); q->setAccessibleProperty("pressed", pressed); - stopPressRepeat(); + if (!pressed) + stopPressRepeat(); return pressed; } |