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

View File

@@ -82,8 +82,6 @@ DeclareSetting(bool, Quit);
DeclareSetting(QByteArray, LocalSalt);
DeclareSetting(int, ScreenScale);
DeclareSetting(int, ConfigScale);
DeclareSetting(QString, DateFormat);
DeclareSetting(QString, TimeFormat);
class DocumentData;
@@ -111,14 +109,6 @@ DeclareSetting(QString, StartUrl);
DeclareSetting(int, OtherOnline);
inline void cChangeDateFormat(const QString &newFormat) {
if (!newFormat.isEmpty()) cSetDateFormat(newFormat);
}
inline void cChangeTimeFormat(const QString &newFormat) {
if (!newFormat.isEmpty()) cSetTimeFormat(newFormat);
}
inline bool passcodeCanTry() {
if (cPasscodeBadTries() < 3) return true;
auto dt = crl::now() - cPasscodeLastTry();