diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2022-11-01 10:44:33 +0100 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2022-11-11 17:48:51 +0100 |
commit | efb74636567d9eff3366e439faf37eea5d6d3668 (patch) | |
tree | 362a6972e571caef3aa3825146287ed6b38fced5 /tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | |
parent | 735048051933bc30a3a0398ba40f86e4b6ba72d2 (diff) |
Add comment to tst_QWidget::saveRestoreGeometry() for debugging
saveRestoreGeometry() somtimes creates a 29px offset when debugged in
Qt Creator, which makes the test fail.
This patch adds a code comment to make developers aware of this fact.
Pick-to: 6.2 6.4
Change-Id: I920bd02eb7543faf8b25a0a242b888f3a3745e2a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index af1c15b517..c52ad80ccb 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -4025,6 +4025,13 @@ void tst_QWidget::saveRestoreGeometry() QVERIFY(QTest::qWaitForWindowExposed(&widget)); QApplication::processEvents(); + + /* --------------------------------------------------------------------- + * This test function is likely to flake when debugged with Qt Creator. + * (29px offset making the following QTRY_VERIFY2 fail) + * --------------------------------------------------------------------- + */ + QTRY_VERIFY2(HighDpi::fuzzyCompare(widget.pos(), position, m_fuzz), qPrintable(HighDpi::msgPointMismatch(widget.pos(), position))); QCOMPARE(widget.size(), size); |