cTimeFormat/cDateFormat -> QLocale::ShortFormat

This allows to use platform-specific formatting functions
This commit is contained in:
Ilya Fedin
2022-12-15 13:47:56 +04:00
committed by John Preston
parent 9633f93690
commit 66093f0cb5
25 changed files with 46 additions and 73 deletions
@@ -79,12 +79,16 @@ Authorizations::Entry ParseEntry(const MTPDauthorization &data) {
const auto nowDate = now.date();
const auto lastDate = lastTime.date();
if (lastDate == nowDate) {
result.active = QLocale().toString(lastTime, cTimeFormat());
result.active = QLocale().toString(
lastTime.time(),
QLocale::ShortFormat);
} else if (lastDate.year() == nowDate.year()
&& lastDate.weekNumber() == nowDate.weekNumber()) {
result.active = langDayOfWeek(lastDate);
} else {
result.active = QLocale().toString(lastDate, cDateFormat());
result.active = QLocale().toString(
lastDate,
QLocale::ShortFormat);
}
}
result.location = country;