mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Use default-constructed QLocale for date/time/whatever else formatting
Qt 6 chenged the QDateTime API to use QLocale::c() rather than QLocale::system(), using default-constructed QLocale will make this consistent and overradable application-wide Other formating use-cases as QLocale::decimalPoint use default-constructed QLocale now, too
This commit is contained in:
@@ -1102,8 +1102,8 @@ std::optional<QString> RestrictionError(
|
||||
auto restrictedUntil = channel->restrictedUntil();
|
||||
if (restrictedUntil > 0 && !ChannelData::IsRestrictedForever(restrictedUntil)) {
|
||||
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
|
||||
auto date = restrictedUntilDateTime.toString(cDateFormat());
|
||||
auto time = restrictedUntilDateTime.toString(cTimeFormat());
|
||||
auto date = QLocale().toString(restrictedUntilDateTime, cDateFormat());
|
||||
auto time = QLocale().toString(restrictedUntilDateTime, cTimeFormat());
|
||||
|
||||
switch (restriction) {
|
||||
case Flag::SendPolls:
|
||||
|
Reference in New Issue
Block a user