From 659a6a5f71d81343a5574915f5d57ae7832237a0 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 19 Jul 2017 14:59:52 +0200 Subject: [PATCH] fix(app): display locale only if help or version is not displayed --- src/app/App.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/App.cpp b/src/app/App.cpp index 4939df467..aa029324b 100644 --- a/src/app/App.cpp +++ b/src/app/App.cpp @@ -102,6 +102,8 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::U if (mParser->isSet("version")) mParser->showVersion(); + + qInfo() << QStringLiteral("Use locale: %1").arg(mLocale); } App::~App () { @@ -462,7 +464,6 @@ void App::initLocale (const shared_ptr &config) { if (!locale.isEmpty() && ::installLocale(*this, *mTranslator, QLocale(locale))) { mLocale = locale; - qInfo() << QStringLiteral("Use preferred locale: %1").arg(locale); return; } @@ -470,7 +471,6 @@ void App::initLocale (const shared_ptr &config) { QLocale sysLocale = QLocale::system(); if (::installLocale(*this, *mTranslator, sysLocale)) { mLocale = sysLocale.name(); - qInfo() << QStringLiteral("Use system locale: %1").arg(mLocale); return; } @@ -478,7 +478,6 @@ void App::initLocale (const shared_ptr &config) { mLocale = DEFAULT_LOCALE; if (!::installLocale(*this, *mTranslator, QLocale(mLocale))) qFatal("Unable to install default translator."); - qInfo() << QStringLiteral("Use default locale: %1").arg(mLocale); } QString App::getConfigLocale () const {