From e6c7d049f4c737c8d98b0abf5d20e6ebeec1d646 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 15 Jul 2022 09:27:19 +0200 Subject: QGraphicsProxyWidget: make tolerance in mapToGlobal test at least 4 a61bf508e3c138c429e0a73498c745c3c0d3f0f7 reduced the tolerance from 4 to 3 in one case, making the test more rather than less flaky on systems with a device-pixel-ratio of 1. Pick-to: 6.4 6.3 6.2 Change-Id: I245443f0dcb1aa40176c127025501b63f12f161b Reviewed-by: Fabian Kosmale --- .../graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 69ecee59e1..a73a736e5b 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3531,7 +3531,7 @@ void tst_QGraphicsProxyWidget::mapToGlobal() // QTBUG-41135 QCOMPARE(embeddedWidget->mapFromGlobal(embeddedCenterGlobal), embeddedCenter); // This should be equivalent to the view center give or take rounding // errors due to odd window margins - const int Tolerance = qCeil(3 * view.devicePixelRatio()); + const int Tolerance = qCeil(4 * view.devicePixelRatio()); const QPoint viewCenter = view.geometry().center(); QVERIFY2((viewCenter - embeddedCenterGlobal).manhattanLength() <= Tolerance, msgPointMismatch(embeddedCenterGlobal, viewCenter).constData()); -- cgit v1.2.3