summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-15 09:27:19 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-15 14:44:32 +0200
commite6c7d049f4c737c8d98b0abf5d20e6ebeec1d646 (patch)
treec4c4258783457442192b092654de91c55e2ac779
parentef4372dcaebeebedd2706a05462ef5d9f5bf6171 (diff)
downloadqtbase-e6c7d049f4c737c8d98b0abf5d20e6ebeec1d646.tar.gz
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 <fabian.kosmale@qt.io>
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp2
1 files changed, 1 insertions, 1 deletions
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());