From b0797cfed63d14707249a85e09c03177595a4df8 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Thu, 5 Jul 2018 12:41:28 +0200 Subject: QCalendarWidget: update the year label correctly on locale change The year label in the header would show an unlocalized year number. Fix by setting it equal to the year editor's correctly localized string. Task-number: QTBUG-69038 Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1 Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qcalendarwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 9559b58339..4946969360 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -1946,8 +1946,8 @@ void QCalendarWidgetPrivate::updateNavigationBar() QString monthName = q->locale().standaloneMonthName(m_model->m_shownMonth, QLocale::LongFormat); monthButton->setText(monthName); - yearButton->setText(QString::number(m_model->m_shownYear)); yearEdit->setValue(m_model->m_shownYear); + yearButton->setText(yearEdit->text()); } void QCalendarWidgetPrivate::update() -- cgit v1.2.3