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.

Change-Id: I245443f0dcb1aa40176c127025501b63f12f161b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e6c7d049f4c737c8d98b0abf5d20e6ebeec1d646)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Volker Hilsheimer 2022-07-15 09:27:19 +02:00
parent 583cbd607f
commit b5ce6fcffc

View File

@ -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());