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/libs/installer/component.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs/installer') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 234d57622..40c5b7340 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -346,12 +346,12 @@ void Component::loadDataFromPackage(const Package &package) .split(QInstaller::commaRegExp(), QString::SkipEmptyParts); if (!uis.isEmpty()) loadUserInterfaces(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), uis); - +#ifndef IFW_DISABLE_TRANSLATIONS const QStringList qms = package.data(QLatin1String("Translations")).toString() .split(QInstaller::commaRegExp(), QString::SkipEmptyParts); if (!qms.isEmpty()) loadTranslations(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), qms); - +#endif QHash licenseHash = package.data(QLatin1String("Licenses")).toHash(); if (!licenseHash.isEmpty()) loadLicenses(QString::fromLatin1("%1/%2/").arg(localTempPath(), name()), licenseHash); -- cgit v1.2.3