From 4d262cba26737afcf44b037799fd9c6969e1a986 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 23 May 2017 16:01:41 +0300 Subject: [PATCH] Fixed bug in Tape app. Tape showed birth date in wrong locale. (grafted from a97fb493ae6c7d6f2a6645913dcc4db16219efac) --HG-- branch : develop --- ChangeLog.txt | 1 + src/app/tape/tmainwindow.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 50c77040e..ef5f412c0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -9,6 +9,7 @@ - [#687] Wrong seam allowance. - [#689] Grainline default values swapped around. - [#688] Difficult to enter numbers in Tape. +- Fixed bug in Tape app. Tape showed birth date in wrong locale. # Version 0.5.0 May 9, 2017 - [#581] User can now filter input lists by keyword in function wizard. diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 4151e8305..5d6897a16 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -2082,8 +2082,13 @@ void TMainWindow::InitWindow() const qint32 index = ui->comboBoxGender->findData(static_cast(m->Gender())); ui->comboBoxGender->setCurrentIndex(index); - ui->dateEditBirthDate->setDisplayFormat(QLocale().dateFormat()); - ui->dateEditBirthDate->setDate(m->BirthDate()); + { + const QLocale dateLocale = QLocale(qApp->Settings()->GetLocale()); + ui->dateEditBirthDate->setLocale(dateLocale); + ui->dateEditBirthDate->setDisplayFormat(dateLocale.dateFormat()); + ui->dateEditBirthDate->setDate(m->BirthDate()); + } + ui->lineEditEmail->setText(m->Email()); connect(ui->lineEditGivenName, &QLineEdit::editingFinished, this, &TMainWindow::SaveGivenName);