Replace with a parser which actually does the job right, fixing
various infelicities in the parsing in the process.
Make the parser strict about formatting.
Adjusted tests to match. Fixed some QTime invalidity tests to each
test only one invalidity at a time (the invalid year and day tests
also used an invalid month).
[ChangeLog][QtCore][QDateTime] The parser for the Qt::RFC2822Date
format is now stricter, requiring the text to exactly match the form
of one of the relevant formats. A valid date or time will still be
parsed, even if the other part of the content is invalid, as long as
it (and any offset, if present) has the right form. In particular, the
parser now rejects texts with trailing cruft (other than space).
Fixes: QTBUG-80038
Change-Id: Id25675afd75f82f6351f20e79f0154f3ceda35ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt
Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.
Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
Conflicts:
examples/widgets/graphicsview/boxes/scene.h
src/corelib/Qt5CoreMacros.cmake
src/corelib/Qt6CoreMacros.cmake
src/network/ssl/qsslsocket.cpp
src/network/ssl/qsslsocket.h
src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
src/testlib/CMakeLists.txt
src/testlib/.prev_CMakeLists.txt
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.
Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
They overlapped and the latter had duplicated code, so make them into
a single data-driven test. At the same time, replace the '-' at the
start of the expected string with QLocale::negativeSign(), since the
test fails otherwise when LC_NUMERIC=nb_NO on Linux (Debian/testing).
Change-Id: I051c75abff16b2e6f8278fcb152b6bde14c71f9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The ones we reject used a zero offset while the one that does parse
(though it shouldn't - revised comment) has a one hour offset. Made
them all use that offset and added a partner test that has no invalid
characters, so ensure the success of the invalid character tests isn't
due to falsely rejecting the valid date/time text to which the invalid
characters are added.
Task-number: QTBUG-80038
Change-Id: I6e3dd79b981af6803e60877229c56599cfd719cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The qdatetime implementation's rfcDateImpl() uses regexes which did
not match its comments; nor did either the regexes or the comments
match what was documented. A review of relevant RFCs suggests we
should revise this in future, probably at Qt 6.
The documentation also only addressed the formats recognized when
parsing a date-time, without indicating how they are serialised or how
dates and times are handled separately.
Added a note to the tests for the read-only formats, to remind the
reader that the RFCs merely recommend recognising these - be
permissive in what you expect and strict in what you deliver.
Change-Id: I0f0bec752e7a50bde98cceceb7e0d11be15c6a6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Idcd5d1be7503b50a43954c1b209e48a32cc8eaa9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Replaced the usages of:
* QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch().
* QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch().
* QDate::shortDayName() -> QLocale::system().dayName().
* QTime by QElapsedTimer, where the deprecated methods of QTime
were used.
- Modified the tests for the deprecated methods to be enabled only
when the corresponding methods are enabled: when the deprecated
APIs are disabled, the tests will be also disabled, and the
compilation won't be broken.
Task-number: QTBUG-76491
Change-Id: I4d565db2329e580c567aae511696eb1efe120843
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This changes many different CMake places to mention Qt6 instead of
Qt5.
Note that some old qt5 cmake config files in corelib are probably not
needed anymore, but I still renamed and kept them for now.
Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
We'll be adding calendar code here as well, and tools/ was getting
rather crowded, so it looks like time to move out a reasonably
coherent sub-bundle of it all.
Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>