mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +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:
@@ -272,8 +272,8 @@ void Application::run() {
|
||||
|
||||
DEBUG_LOG(("Application Info: inited..."));
|
||||
|
||||
cChangeDateFormat(QLocale::system().dateFormat(QLocale::ShortFormat));
|
||||
cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat));
|
||||
cChangeDateFormat(QLocale().dateFormat(QLocale::ShortFormat));
|
||||
cChangeTimeFormat(QLocale().timeFormat(QLocale::ShortFormat));
|
||||
|
||||
DEBUG_LOG(("Application Info: starting app..."));
|
||||
|
||||
|
@@ -77,7 +77,7 @@ QString filedialogDefaultName(
|
||||
QString base;
|
||||
if (fileTime) {
|
||||
const auto date = base::unixtime::parse(fileTime);
|
||||
base = prefix + date.toString("_yyyy-MM-dd_HH-mm-ss");
|
||||
base = prefix + QLocale().toString(date, "_yyyy-MM-dd_HH-mm-ss");
|
||||
} else {
|
||||
struct tm tm;
|
||||
time_t t = time(NULL);
|
||||
|
Reference in New Issue
Block a user