From d43391422aaecc35d6e6435c9442673c5d585565 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 24 Mar 2023 15:00:44 +0100 Subject: [PATCH] Correct the start of a QDTE::stepIntoDSTGap() test The test wants to start shortly after the transition, then step an hour backwards, into it, to check we land safely on the other side. However, it assumed the gap witdh was an hour, which is not reliable. Use the gapWidth already used in computing springGap instead. The -3590 seconds in the result time is correct, as it's the ten extra seconds we started beyond the gap, minus the hour we step backwards. Pick-to: 6.5 Change-Id: I4399af7e54a60bd55ea51d054d3cd2ecfcb0e354 Reviewed-by: Volker Hilsheimer --- tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 89b20065e9..59ec032c48 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -4723,7 +4723,7 @@ void tst_QDateTimeEdit::stepIntoDSTGap_data() // 3:00:10 into 2:00:10 should get us to 1:00:10 QTest::addRow("hour down into %s gap", springTime.data()) - << QDateTime(spring, springGap.addSecs(3610)) + << QDateTime(spring, springGap.addSecs(gapWidth + 10)) << QDateTimeEdit::HourSection << -1 << QDateTime(spring, springGap.addSecs(-3590));