aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data')
-rw-r--r--tests/auto/controls/data/tst_stackview.qml22
-rw-r--r--tests/auto/controls/data/tst_tumbler.qml4
2 files changed, 24 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index f4b7fc4a..6f6497c5 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -1197,4 +1197,26 @@ TestCase {
compare(control.depth, 1)
verify(item)
}
+
+ // QTBUG-65084
+ function test_mouseArea() {
+ var ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
+ verify(ma)
+
+ var control = stackView.createObject(ma, {width: testCase.width, height: testCase.height})
+ verify(control)
+
+ mousePress(control)
+ verify(ma.pressed)
+
+ mouseRelease(control)
+ verify(!ma.pressed)
+
+ var touch = touchEvent(control)
+ touch.press(0, control).commit()
+ verify(ma.pressed)
+
+ touch.release(0, control).commit()
+ verify(!ma.pressed)
+ }
}
diff --git a/tests/auto/controls/data/tst_tumbler.qml b/tests/auto/controls/data/tst_tumbler.qml
index 1fab0dab..fbcb2c40 100644
--- a/tests/auto/controls/data/tst_tumbler.qml
+++ b/tests/auto/controls/data/tst_tumbler.qml
@@ -350,8 +350,8 @@ TestCase {
verify(firstItem);
// Test QTBUG-40298.
actualPos = testCase.mapFromItem(firstItem, 0, 0);
- compare(actualPos.x, tumbler.leftPadding);
- compare(actualPos.y, tumbler.topPadding);
+ fuzzyCompare(actualPos.x, tumbler.leftPadding, 0.0001);
+ fuzzyCompare(actualPos.y, tumbler.topPadding, 0.0001);
var secondItemCenterPos = itemCenterPos(1);
var secondItem = tumblerView.itemAt(secondItemCenterPos.x, secondItemCenterPos.y);