qt6-bb10/tests/auto/corelib
Edward Welbourne b8fac53803 Add QCalendar::matchCenturyToWeekday()
This takes a YearMonthDay and a day-of-the-week, returning a QDate
that (if possible, else invalid) has the given day of the week and
differs from the YearMonthDay only in the century. This is useful when
resolving dates with only two-digit year information, which can be
disambiguated by the day of the week. Added tests of the new API.

This adds a new virtual method to QCalendarBackend, for which that
base class does provide a brute force implementation, so derived
classes do not need to add implementations. It is, however, a
binary-incompatible change for any backend plugins that may be in use
to implement custom calendars.

Worked out the details for the Gregorian calendar to make it possible
to compute the right century (and whether any century works) without
trial-and-error searching. Coded that up as its implementation of the
new method.

[ChangeLog][QtCore][QCalendar] Added a matchCenturyToWeekday() method
for use when resolving dates given day, month and last two digits of
the year, along with day of the week. Any custom calendar backend
plugins shall need a recompile and may, optionally, implement the new
virtual method behind this.

Change-Id: I6003c8d9423d6bfb833957bb5120f2d423219c7a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-12-08 11:40:36 +01:00
..
animation Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
global Add missing <=> 0 operator to Qt ordering types 2023-12-07 23:36:15 +01:00
io Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
ipc QSharedMemory: fix attach() -> create() for non-legacy SystemV mode 2023-11-08 15:56:54 +01:00
itemmodels Q(Persistent)ModelIndex: use new test framework for op== 2023-11-13 17:35:54 +02:00
kernel QMetaEnum: let key(s)ToValue match fully-qualified unscoped enumerators 2023-11-26 22:51:49 +02:00
mimetypes Long live QSpan as public API! 2023-12-07 22:38:15 +00:00
platform Android: fix and simplify the orientation change logic 2023-12-05 16:28:12 +00:00
plugin QFactoryLoader: add metaDataKeys() to return just the "Keys" entry 2023-11-28 03:14:03 -08:00
serialization Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
text tst_QString: explain TransientDefaultLocale better 2023-12-07 23:55:08 +01:00
thread Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
time Add QCalendar::matchCenturyToWeekday() 2023-12-08 11:40:36 +01:00
tools Make QAtomicScopedValueRollback public API 2023-12-08 02:24:41 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00