qt5base-lts/tests/auto/corelib
Edward Welbourne 4e675cb85e Handle trailing cruft consistently in Qt::DateFormat parsing
Previously the ISO time format would tolerate trailing cruft at the
end in various cases even though there might be an offset specifier
after the time, which should *not* be separated from it by anything
(not even the spaces we originally planned to still tolerate).

The RFC date format is forgiving about space, as is suitable for
parsing of RFC-822 headers, but the other formats should match the
handling in QDateTimeParser, which rejects any dangling cruft.

At the same time, since this required a re-write of
fromIsoTimeString() in any case, add support for the ISO format that
gives the hour a fractional part and skips minutes and
seconds. Previously we only had support for fractional minutes (with
no seconds). The hour without even a fractional part is also valid.

Reworked the documentation of Qt::DateFormat as it was wrong in
places, inconsistent in its formatting and incomplete. Adjusted some
tests to match the new behavior. A fraction separator with no
following digits should have been recognized as an error previously
and now is.

[ChangeLog][QtCore][QDateTime] The ISODate and ISODateWithMs formats
now reject trailing cruft (including spaces) at the end of a time
string. They also gain support for parsing hour-only formats,
including the hour-with-fractional-part format.

Task-number: QTBUG-86133
Change-Id: I38ad1479ae033407f7df97ffbeb7c4bcd463d04a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-03 07:09:57 +02:00
..
animation CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
global Add {add,sub,mul}_overflow detection when one operand is a constant 2020-09-29 14:55:48 -07:00
io Properly deprecate QProcess::pid 2020-10-01 04:55:47 +02:00
itemmodels CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
kernel Fix ChangeHandler notification for eager properties 2020-09-30 09:27:50 +02:00
mimetypes CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
plugin CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
serialization QJsonObject: fix sorting after parsing from JSON text 2020-09-29 16:14:37 -07:00
text QREMatchIterator: add support for range-based for 2020-09-30 21:39:36 +02:00
thread Fix race condition in QThreadPool::clear 2020-10-01 12:15:22 +02:00
time Handle trailing cruft consistently in Qt::DateFormat parsing 2020-10-03 07:09:57 +02:00
tools Deal with {und,ov}erflow issues in QLine's length handling 2020-09-30 16:26:49 +02:00
.prev_CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
corelib.pro Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00