aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFilippo Cucchetto <filippocucchetto@gmail.com>2016-06-02 21:49:37 +0200
committerFilippo Cucchetto <filippocucchetto@gmail.com>2016-06-03 10:32:33 +0000
commit7039db4885a143f8f1d363c9b71665e9160d3d55 (patch)
tree6a16ec159237081e60b10241257bea06d12d5bc0 /tests
parent38b11b7b52b418629ff2d245dad70edf20eb520c (diff)
Revert removal of "Fixed MouseArea threshold with preventStealing"
This reverts commit 9c8dab537819f0d999e680490c2d125b8836cbbb where commit e1400b5b4d8311769ad3b9f631479ee2b0271197 was removed due to the breakage of QtLocation tests. After some hours of debugging it seems that the problem in QtLocation was due to filtering of mouse move events in QDeclarativeGeoMapItemBase. See QTBUG-52075 Task-number: QTBUG-52534 Change-Id: I00f002c1d6f60f74a148b5a6ac2b9f63e93718a9 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index 82c053d76a..9cdfd21f9c 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -79,6 +79,7 @@ private slots:
void dragging_data() { acceptedButton_data(); }
void dragging();
void dragSmoothed();
+ void dragThreshold_data();
void dragThreshold();
void invalidDrag_data() { rejectedButton_data(); }
void invalidDrag();
@@ -375,8 +376,17 @@ void tst_QQuickMouseArea::dragSmoothed()
QTest::mouseRelease(&window, Qt::LeftButton, 0, QPoint(100, 122));
}
+void tst_QQuickMouseArea::dragThreshold_data()
+{
+ QTest::addColumn<bool>("preventStealing");
+ QTest::newRow("without preventStealing") << false;
+ QTest::newRow("with preventStealing") << true;
+}
+
void tst_QQuickMouseArea::dragThreshold()
{
+ QFETCH(bool, preventStealing);
+
QQuickView window;
QByteArray errorMessage;
QVERIFY2(initView(window, testFileUrl("dragging.qml"), true, &errorMessage), errorMessage.constData());
@@ -386,6 +396,7 @@ void tst_QQuickMouseArea::dragThreshold()
QVERIFY(window.rootObject() != 0);
QQuickMouseArea *mouseRegion = window.rootObject()->findChild<QQuickMouseArea*>("mouseregion");
+ mouseRegion->setPreventStealing(preventStealing);
QQuickDrag *drag = mouseRegion->drag();
drag->setThreshold(5);