Fix bug. Date on label doesn't obey GUI language locale.

(grafted from b60a78d145f51bef3bc08978e1fe3b0a7d6500ab)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-06-29 14:47:24 +03:00
parent 9c14f46a26
commit b18f5fa928
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@
- [#704] Valentina crashes if click on detail. - [#704] Valentina crashes if click on detail.
- [#706] Default unit in preferences not changing new file unit. - [#706] Default unit in preferences not changing new file unit.
- Fix bug. Valentina overrids exported file even if a user said no. - Fix bug. Valentina overrids exported file even if a user said no.
- Fix bug. Date on label doesn't obey GUI language 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

@ -376,7 +376,8 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
} }
if (date.isValid() == true) if (date.isValid() == true)
{ {
tl.m_qsText = date.toString("dd MMMM yyyy"); QLocale locale(qApp->Settings()->GetLocale());
tl.m_qsText = locale.toString(date, "dd MMMM yyyy");
tl.m_eFontWeight = QFont::Normal; tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal; tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 0; tl.m_iFontSize = 0;