qt6-bb10/tests/auto/corelib
Edward Welbourne 964f91fd25 Make POSIX transition rule parser more robust
The POSIX rule parser used by QTzTimeZonePrivate recklessly assumed
that, if splitting the rule on a dot produced more than one part, it
necessarily produced at least three. That's true for well-formed POSIX
rules, but we should catch the case of malformed rules.

Likewise, when calculating the dates of transitions, splitting the
date rule on dots might produce too few fragments; and the fragments
might not parse as valid numbers, or might be out of range for their
respective fields in a date. Check all these cases, too.

Added a test that crashed previously. Changed
QTimeZone::offsetFromUtc() so that its "return zero on invalid"
applies also to the case where the backend returns invalid, in
support of this.

Fixes: QTBUG-92808
Pick-to: 6.1 6.1.0 6.0 5.15
Change-Id: Ica383a7a987465483341bdef8dcfd42edb6b43d6
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-04-14 12:57:30 +02:00
..
animation Port QPauseAnimation to the new property system 2021-01-26 21:47:47 +01:00
global CMake: Build minimal subset of tests in desktop static builds 2021-04-06 09:15:37 +01:00
io Disable security warnings from MSVC in tests 2021-03-17 17:22:00 +01:00
itemmodels Fix get out of bounds index in QSortFilterProxyModel::filterAcceptsRow 2021-04-07 19:30:08 +08:00
kernel QBindable: Mark non-modifying methods as const 2021-04-14 09:24:33 +02:00
mimetypes Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
plugin Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
serialization QJsonObject: Fix operator<=() 2021-02-18 11:22:51 +00:00
text Mark variables that might be unused under some configurations 2021-04-11 19:53:43 +02:00
thread QtFuture::connect: disconnect signals first 2021-04-12 12:37:40 +02:00
time Make POSIX transition rule parser more robust 2021-04-14 12:57:30 +02:00
tools Fix gcc warnings from having only one of assignment/copy 2021-04-11 19:53:51 +02:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00