Specify year in month name lookups for QCalendarWidget
The compiler didn't complain at a QLocale::FormatType values being passed for the int year parameters of the month-name functions, which all have a default for their final QLocale::FormatType parameters. So we didn't notice that the year parameter was missing until the bug was reported. Removed some code duplication by giving QCalendarModel a monthName() method. Reworked QCalendarMonthValidator::text() to avoid repeated calendar calculations (and use fewer braces). This commit amends commit 2dee0062 Fixes: QTBUG-79495 Change-Id: Iad48c3b648a0139ab43511e6fb4e6a8f63a0495f Reviewed-by:Volker Hilsheimer <volker.hilsheimer@qt.io>
Showing
Please register or sign in to comment