Ivan Solovev c32b15f119 Make public QLocale's constant for the two-digit-year base
The private QLocale::FirstTwoDigitYear constant, which is used as a
default value for the parameters in some methods, causes troubles for
Qt for Python Team, because they need to use the default values in the
binding code. It also potentially create some inconveniences for the
users who want to write functions wrapping these methods.

The name is also confusing, because, when read out of context, it
implies that there might be SecondTwoDigitYear, etc...
Rename QLocale::FirstTwoDigitYear to QLocale::DefaultTwoDigitBaseYear
and make it public.

Now when the constant is public, we can use it in QDate, instead of
introducing another constant, so do that.
The qdatetime.h header already includes qlocale.h via qcalendar.h,
but, rather than relying on this transitive include, add it
explicitly.

As pointed out by Thiago [1], the static constexpr members of exported
classes need out-of-line definitions, so add such definition to
qlocale.cpp.

Amends 41f84f3ddb780ec751e3fc706dd242fc4a99de7a

Found in 6.7 API review.

[1]: https://lists.qt-project.org/pipermail/development/2024-January/044888.html

Change-Id: Ib3c6f1d5b181968bf311fd0435173e025a369865
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cde7d5d3ff56fdf219771c65bf93f3f08757f154)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-22 14:57:34 +00:00
2020-11-16 10:02:08 +02:00
2015-08-18 19:59:14 +00:00
2024-01-22 13:45:24 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%