From 2efc27fc698e18afc98f1c414e5519cf455d95c2 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 25 Aug 2020 18:12:32 +0300 Subject: Allow disabling translation features with environment variable 'IFW_DISABLE_TRANSLATIONS' can be used to disable translation features with a value of '1', '0' or any other values are ignored. The variable is evaluated at the time of running qmake. Task-number: QTIFW-1911 Change-Id: I99c472eae4229b8add109fcf7f764f670909231d Reviewed-by: Katja Marttila --- src/sdk/installerbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sdk/installerbase.cpp') diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 914be33f6..ee710a1ea 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -85,7 +85,7 @@ int InstallerBase::run() } qCDebug(QInstaller::lcInstallerInstallLog) << "Language:" << QLocale().uiLanguages() .value(0, QLatin1String("No UI language set")).toUtf8().constData(); - +#ifndef IFW_DISABLE_TRANSLATIONS const QString directory = QLatin1String(":/translations"); // Check if there is a modified translation first to enable people // to easily provide corrected translations to Qt/IFW for their installers @@ -124,7 +124,7 @@ int InstallerBase::run() QCoreApplication::instance()->installTranslator(translator.take()); } } - +#endif { QDirIterator fontIt(QStringLiteral(":/fonts")); while (fontIt.hasNext()) { -- cgit v1.2.3