Improve "Incompatible locale" check.

This commit is contained in:
Roman Telezhynskyi 2022-09-15 15:02:44 +03:00
parent e160bb02ff
commit 65400da902
3 changed files with 6 additions and 6 deletions

View File

@ -402,14 +402,14 @@ void VPApplication::InitOptions()
qCDebug(pApp, "Command-line arguments: %s", qUtf8Printable(arguments().join(QStringLiteral(", "))));
qCDebug(pApp, "Process ID: %s", qUtf8Printable(QString().setNum(applicationPid())));
CheckSystemLocale();
QPixmapCache::setCacheLimit(50 * 1024 /* 50 MB */);
LoadTranslation(QString());// By default the console version uses system locale
VPCommandLine::Instance();
CheckSystemLocale();
static const char * GENERIC_ICON_TO_CHECK = "document-open";
if (not QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK))
{

View File

@ -441,10 +441,10 @@ void MApplication::InitOptions()
qCDebug(mApp, "Command-line arguments: %s", qUtf8Printable(arguments().join(QStringLiteral(", "))));
qCDebug(mApp, "Process ID: %s", qUtf8Printable(QString().setNum(applicationPid())));
CheckSystemLocale();
LoadTranslation(QString());// By default the console version uses system locale
CheckSystemLocale();
static const char * GENERIC_ICON_TO_CHECK = "document-open";
if (not QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK))
{

View File

@ -613,13 +613,13 @@ void VApplication::InitOptions()
qDebug()<<"Command-line arguments:"<<arguments();
qDebug()<<"Process ID:"<<applicationPid();
CheckSystemLocale();
LoadTranslation(QString());// By default the console version uses system locale
// Create command line parser after loading translations to show localized version.
VCommandLine::Get(*this);
CheckSystemLocale();
if (VApplication::IsGUIMode())// By default console version uses system locale
{
LoadTranslation(ValentinaSettings()->GetLocale());