Go to file
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
.github/workflows GitHub Actions: Fix workflow file 2020-09-11 13:37:48 +02:00
bin CMake: Strip binaries and libraries upon installation 2020-09-30 16:16:00 +02:00
cmake CMake: Clean up the public API a bit 2020-10-01 14:57:12 +02:00
coin Set MSVC environment script specifically for MSVC 2020-10-01 22:54:22 +03:00
config.tests CMake: Skip regeneration of manual compile test project 2020-04-09 11:26:46 +02:00
dist Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
doc Doc: Remove unused porting guide document 2020-09-16 18:32:05 +02:00
examples Stylesheet example: Get rid of auto-connection slots 2020-09-25 18:04:06 +03:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Android: unify deployment-settings.json path to unix format 2020-10-02 11:13:19 +03:00
qmake Android: set default API level to 23 in docs 2020-09-23 17:59:07 +03:00
src Handle trailing cruft consistently in Qt::DateFormat parsing 2020-10-03 07:09:57 +02:00
tests Handle trailing cruft consistently in Qt::DateFormat parsing 2020-10-03 07:09:57 +02:00
util CMake: Rename internal functions to contain qt_internal 2020-09-23 16:59:05 +02:00
.cmake.conf pro2cmake.py: Generate .cmake.conf files for versioning 2020-04-30 17:44:03 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt CMake: Disable usage of CMake API compatibility wrappers 2020-09-23 16:59:06 +02:00
config_help.txt CMake Build: Add support for -qtlibinfix configure parameter 2020-09-23 17:31:13 +02:00
configure configure: add -qmake argument 2020-10-01 14:34:05 +02:00
configure.bat configure: add -qmake argument 2020-10-01 14:34:05 +02:00
configure.cmake By default don't try to use pkg-config when targeting Android 2020-09-28 15:48:17 +02:00
configure.json By default don't try to use pkg-config when targeting Android 2020-09-28 15:48:17 +02:00
configure.pri Android: allow setting javac build version from the configure script 2020-09-16 20:55:08 +03:00
dependencies.yaml Re-add dependencies.yaml so repos outside qt5 can be built with Coin 2019-09-19 17:07:36 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
qtbase.pro Update qmake before building src 2020-08-19 18:25:51 +02:00
sync.profile Remove last remaining bits of QtPlatformHeaders 2020-08-04 07:12:32 +02:00