diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-05-15 12:35:08 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-05-28 06:14:32 +0000 |
commit | 5aaade8c935caa1add92f61187c0065e34cf7e0e (patch) | |
tree | ff25bd160f5a610e200816d99b1f01d3c2d0f225 /src/widgets/doc | |
parent | 11569f7071e5ac6b50672ad400e6ed6e70ecd76b (diff) |
Fix editing of QDateTimeEdit in 12-hour locales that don't use AM/PM
The code made two incorrect assumptions: that the strings used are "AM"
or "PM", or would be translated. Instead, the locale provides the
correct strings, and there is no need to translate. However, in order
not to break existing translations, we give those preference.
And that the AM/PM string is not longer than 4 characters, while in
e.g Spanish/Columbia locale the strings are "A. M." and "P. M.", ie 5
characters long. Also, the use of qMin in a function that is asked to
provide the maximum section length is wrong.
[ChangeLog][QWidgets][QDateTimeEdit] Use the information provided by
the locale to determine the AM/PM strings, unless they are already
translated.
Change-Id: I6d1b05376e5ac62fc58da2cdea2e6cb732ec6747
Fixes: QTBUG-72833
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/doc')
0 files changed, 0 insertions, 0 deletions