qt5base-lts/src
Edward Welbourne d093ec8d03 Fix handling of day-of-week in QDateTimeParser and QDateTimeEdit
QDTP's absoluteMax(), setDigit() and getDigit() simply treated
day-of-week as synonym for day-of-month.
Consequently, QDTE::stepBy() did the same.

This meant that wrapping happened at the month boundary, so would jump
within the week if it wrapped around, otherwise the up/down arrow
would "jam" at a particular day of the week when further steps would
leave the month. Instead, when wrapping, wrap round the week while
still moving the day-of-month to match, jumping back or forward a week
to stay within the month on hitting a month boundary; otherwise, stop
backwards stepping on hitting the locale-specific day of the week, or
forward stepping when the step would be to or past this first day.
Fixed various bugs found in the course of testing this.

[ChangeLog][QtWidgets][QDateTimeEdit] Corrected handling of weekdays.
Previously, changes to the week-day were simply changes to the day of
the month. Weekday fields are now handled as such: changes to them do
change the day of the month, but a change that would step past the end
(or start) of the month is adjusted to the relevant day of the nearest
week within the month. When wrapping is disabled, the locale-specific
first and last days of the week are the bounds. Formats which specify
day of week but not day of month will now preserve day of week when
changing month or year, selecting the nearest day of month that
matches.

Change-Id: I7868b000fea7a4bc17a1b5687c44bcd56d42ae90
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-06-23 14:04:08 +02:00
..
3rdparty md4c: Fix MSVC compiler level 3 warnings 2021-06-15 22:21:38 +00:00
android Remove unnecessary = signs from build.gradle 2021-06-02 11:20:08 +03:00
concurrent Remove the dead code for blocking methods from QtConcurrent 2021-06-14 11:52:36 +02:00
corelib Fix handling of day-of-week in QDateTimeParser and QDateTimeEdit 2021-06-23 14:04:08 +02:00
dbus qdbus: add support for "aay" (QByteArrayList) 2021-05-02 22:00:43 +02:00
entrypoint Adjust the EntryPoint target name according to the internal module naming policy 2021-06-15 12:51:49 +02:00
gui Enable glyph cache workaround for Apple M-family of GPUs 2021-06-18 19:02:16 +02:00
network Doc: bump the OpenSSL minimum supported version to 1.1.1 2021-06-23 10:49:19 +00:00
opengl Fix inexplicably changed condition in GL backingstore composition 2021-06-09 18:19:16 +02:00
openglwidgets Document QOpenGLWidget limitations without an alpha channel 2021-01-15 15:21:28 +01:00
platformsupport Add the 'Private' suffix to the internal module names 2021-05-31 20:50:07 +02:00
plugins macOS: Unregister screen notification handlers on QGuiApplication shutdown 2021-06-23 13:43:45 +02:00
printsupport Remove old configure-related files 2021-06-18 11:46:21 +02:00
sql Remove old configure-related files 2021-06-18 11:46:21 +02:00
testlib QtTest: de-pessimise TestMethods::MetaMethods handling 2021-06-22 15:26:31 +02:00
tools Enable QT_TYPESAFE_FLAGS for bootstrap and QtCore 2021-06-23 12:49:19 +02:00
widgets Fix handling of day-of-week in QDateTimeParser and QDateTimeEdit 2021-06-23 14:04:08 +02:00
xml Remove old configure-related files 2021-06-18 11:46:21 +02:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00