{
Q_D(QQuickFlickable);
if (d->interactive) {
- if (d->delayedPressEvent) {
- // A move beyond the threshold replays the press to give nested Flickables
- // the opportunity to grab the gesture.
- QPointF delta = event->localPos() - d->delayedPressEvent->localPos();
- if (QQuickWindowPrivate::dragOverThreshold(qAbs(delta.x()), Qt::XAxis, event)
- || QQuickWindowPrivate::dragOverThreshold(qAbs(delta.y()), Qt::YAxis, event)) {
- d->replayDelayedPress();
- }
- }
d->handleMouseMoveEvent(event);
event->accept();
} else {
// On release the clicked signal should be emitted
QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150));
QCOMPARE(clickedSpy.count(),1);
+
+ // QTBUG-31168
+ QTest::mousePress(window.data(), Qt::LeftButton, 0, QPoint(150, 110));
+
+ // The press should not occur immediately
+ QVERIFY(mouseArea->property("pressed").toBool() == false);
+
+ QTest::mouseMove(window.data(), QPoint(150, 190));
+
+ // As we moved pass the drag threshold, we should never receive the press
+ QVERIFY(mouseArea->property("pressed").toBool() == false);
+ QTest::qWait(200);
+ QVERIFY(mouseArea->property("pressed").toBool() == false);
+
+ // On release the clicked signal should *not* be emitted
+ QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 190));
+ QCOMPARE(clickedSpy.count(),1);
}
// QTBUG-17361