diff options
| author | Morten Sørvig <morten.sorvig@qt.io> | 2026-09-04 15:07:21 +0200 |
|---|---|---|
| committer | Morten Sørvig <morten.sorvig@qt.io> | 2026-09-21 11:01:30 +0000 |
| commit | 97dfdce4ab605d13cd55ddf6db6b0687259b93d0 (patch) | |
| tree | 59444c5e9c3caa671e22b69172cec3a9800afb6b | |
| parent | fbe7fa601343a50ef08f698db4a233687cadd681 (diff) | |
tst_QQuickMultiPointTouchArea: store gesture start in real
High-dpi fractional scale factors can introduce float rounding
errors, which together with truncation to int can cause a value
like 99.999... to be stored as 99.
Use floating point real instead and let QCOMPARE handle the
floating point rounding errors with qFuzzyCompare.
Change-Id: I9358ed0b4d0868aa493f87d947e3a01abfb3b5a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| -rw-r--r-- | tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml b/tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml index 6b9dd5b7c7..f4937552b3 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml +++ b/tests/auto/quick/qquickmultipointtoucharea/data/mouse.qml @@ -6,8 +6,8 @@ MultiPointTouchArea { property int touchCount: 0 property int cancelCount: 0 - property int gestureStartedX: 0 - property int gestureStartedY: 0 + property real gestureStartedX: 0 + property real gestureStartedY: 0 property bool grabGesture: false minimumTouchPoints: 1 |
