Reinstate the month name capitalization
Some CLDR (locale) data used by Qt have standalone month names starting with lower-case letters. So if we want to provide consistent look across locales, we need to capitalize it ourselves See https://bugreports.qt-project.org/browse/QTBUG-35100
This commit is contained in:
parent
580d7d198a
commit
d1dc311345
@ -132,7 +132,13 @@ QString Calendar::errorMessage() const
|
|||||||
|
|
||||||
QString Calendar::monthName() const
|
QString Calendar::monthName() const
|
||||||
{
|
{
|
||||||
return QDate::longMonthName(m_startDate.month(), QDate::StandaloneFormat);
|
// Some CLDR (locale) data used by Qt have standalone months names
|
||||||
|
// starting with lower-case letters. So if we want to provide consistent
|
||||||
|
// look across locales, we need to capitalize it ourselves
|
||||||
|
//
|
||||||
|
// see https://bugreports.qt-project.org/browse/QTBUG-35100
|
||||||
|
QString tmp = QDate::longMonthName(m_startDate.month(), QDate::StandaloneFormat);
|
||||||
|
return tmp.left(1).toUpper() + tmp.mid(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Calendar::year() const
|
int Calendar::year() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user