summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2018-07-05 12:41:28 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2018-07-16 13:49:20 +0000
commitb0797cfed63d14707249a85e09c03177595a4df8 (patch)
treee265004b5b637e92ddcc83cade09ac652526d6f3 /src/widgets
parent6f81dbe674c8277bb080e026432a1a0453653678 (diff)
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 <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp2
1 files changed, 1 insertions, 1 deletions
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()