From 496ebd86770bd43bd5d8fd1b4de719bb9f1cf942 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 24 Mar 2023 15:20:16 +0100 Subject: tst_QDateTimeEdit::stepModifierPressAndHold(): tweak start date The test can collide with a 1960-01-01 transition in some zones, so move it to Jan 2nd to avoid that. Pick-to: 6.5 Change-Id: I5286cadc0de0b66283253b0ac736f23a2add0c8f Reviewed-by: Mitch Curtis --- tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/auto/widgets/widgets/qdatetimeedit') diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 0ee3eedbcf..a5e9594ada 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -4510,7 +4510,11 @@ void tst_QDateTimeEdit::stepModifierPressAndHold() QFETCH(Qt::KeyboardModifiers, modifiers); QFETCH(int, expectedStepModifier); - const QDate startDate(2000, 1, 1); + // Some west African zones (e.g. Niamey, Conakry) changed from 1 hour west + // of GMT to GMT at the start of 1960; and spy.size() can get as high as 4, + // causing the expectedDate below, when expectedStepModifier is -10, to land + // in a transition gap for these zones, if we use Jan 1st; so use Jan 2nd. + const QDate startDate(2000, 1, 2); testWidget->hide(); -- cgit v1.2.3