Commit 265b25a5 authored by Edward Welbourne's avatar Edward Welbourne
Browse files

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: default avatarVolker Hilsheimer <volker.hilsheimer@qt.io>
Showing with 21 additions and 14 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment