Fixed bug in Tape app.

Tape showed birth date in wrong locale.
(grafted from a97fb493ae6c7d6f2a6645913dcc4db16219efac)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-05-23 16:01:41 +03:00
parent 8d10ff5234
commit 4d262cba26
2 changed files with 8 additions and 2 deletions

View File

@ -9,6 +9,7 @@
- [#687] Wrong seam allowance. - [#687] Wrong seam allowance.
- [#689] Grainline default values swapped around. - [#689] Grainline default values swapped around.
- [#688] Difficult to enter numbers in Tape. - [#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 # Version 0.5.0 May 9, 2017
- [#581] User can now filter input lists by keyword in function wizard. - [#581] User can now filter input lists by keyword in function wizard.

View File

@ -2082,8 +2082,13 @@ void TMainWindow::InitWindow()
const qint32 index = ui->comboBoxGender->findData(static_cast<int>(m->Gender())); const qint32 index = ui->comboBoxGender->findData(static_cast<int>(m->Gender()));
ui->comboBoxGender->setCurrentIndex(index); 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()); ui->lineEditEmail->setText(m->Email());
connect(ui->lineEditGivenName, &QLineEdit::editingFinished, this, &TMainWindow::SaveGivenName); connect(ui->lineEditGivenName, &QLineEdit::editingFinished, this, &TMainWindow::SaveGivenName);