qt5base-lts/tests/auto/corelib/time/qdatetime
Edward Welbourne 49063c34d6 Fix crash when a date-time has an invalid time-zone
QDateTime is a friend of QTimeZone, so can access its internals; but
it must check the zone is valid before doing so.

Expanded tst_QDateTime::invalid() and made it data-driven to catch the
failure cases.

Commented on a test-case that caught a mistake in my first attempt at
this, and on QDateTimeParser's surprising reliance on a quirk of
QDateTime::toMSecsSinceEpoch()'s behavior.

Fixes: QTBUG-80146
Change-Id: I24856e19ff9bf402152d17d71f83be84e366faad
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2019-12-06 14:44:18 +01:00
..
.gitignore Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
qdatetime.pro Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
tst_qdatetime_mac.mm Separate out the time, zone, date code from corelib/tools/ 2019-06-06 15:54:32 +02:00
tst_qdatetime.cpp Fix crash when a date-time has an invalid time-zone 2019-12-06 14:44:18 +01:00