summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-08-25 18:12:32 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-08-26 07:14:37 +0000
commit2efc27fc698e18afc98f1c414e5519cf455d95c2 (patch)
tree8e3d1b26107163d4342eea5714795f48fb21e337 /src/libs
parent7ab0658e79f44e98dba9baba05c3e704adc4d0ee (diff)
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 <katja.marttila@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/component.cpp4
1 files changed, 2 insertions, 2 deletions
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<QString, QVariant> licenseHash = package.data(QLatin1String("Licenses")).toHash();
if (!licenseHash.isEmpty())
loadLicenses(QString::fromLatin1("%1/%2/").arg(localTempPath(), name()), licenseHash);