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
+2 -2
View File
@@ -1120,8 +1120,8 @@ std::optional<QString> RestrictionError(
auto restrictedUntil = channel->restrictedUntil();
if (restrictedUntil > 0 && !ChannelData::IsRestrictedForever(restrictedUntil)) {
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
auto date = QLocale().toString(restrictedUntilDateTime, cDateFormat());
auto time = QLocale().toString(restrictedUntilDateTime, cTimeFormat());
auto date = QLocale().toString(restrictedUntilDateTime.date(), QLocale::ShortFormat);
auto time = QLocale().toString(restrictedUntilDateTime.time(), QLocale::ShortFormat);
switch (restriction) {
case Flag::SendPolls: