datetime display fixed for OSs with non-English localization (#3204)

This commit is contained in:
David Szabo 2018-04-17 02:07:30 +02:00 committed by Zach H
parent 1fbdea0f35
commit 67a2a8cf08
4 changed files with 17 additions and 2 deletions

View file

@ -1,6 +1,7 @@
#include "logger.h"
#include "version_string.h"
#include <QDateTime>
#include <QLocale>
#include <iostream>
#define LOGGER_MAX_ENTRIES 128
@ -14,6 +15,7 @@ Logger::Logger() : logToFileEnabled(false)
{
logBuffer.append(getClientVersion());
logBuffer.append(getSystemArchitecture());
logBuffer.append(getSystemLocale());
std::cerr << getClientVersion().toStdString() << std::endl;
std::cerr << getSystemArchitecture().toStdString() << std::endl;
}
@ -106,3 +108,10 @@ QString Logger::getClientOperatingSystem()
return {};
}
QString Logger::getSystemLocale()
{
QString result;
result.append(tr("System Locale") + ": " + QLocale().name());
return result;
}