summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-06-02 16:40:24 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-06-02 16:40:24 +0300
commit3fdbd475202703530ca4b8f7f2a0e731d5f87f8b (patch)
tree516a9c48a004fc471fe8bc5dedd4efa72550cab9 /src/libs/installer/component.cpp
parent35f79da9cb99c7c0456f002829dc0fdfe55b4f8d (diff)
parent45e77c3a1eb790d89f2ded5b7fbe556ed4b5271c (diff)
Merge remote-tracking branch 'origin/4.1'
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r--src/libs/installer/component.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 8142cd4e1..b4b96eb08 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -624,15 +624,15 @@ void Component::loadTranslations(const QDir &directory, const QStringList &qms)
while (it.hasNext()) {
const QString filename = it.next();
const QString basename = QFileInfo(filename).baseName();
- if (!uiLanguage.startsWith(QFileInfo(filename).baseName(), Qt::CaseInsensitive))
- continue; // do not load the file if it does not match the UI language
if (!translations.isEmpty()) {
bool found = false;
foreach (const QString &translation, translations)
- found |= translation.startsWith(basename, Qt::CaseInsensitive);
+ found |= translation.startsWith(QLatin1String("ifw_") + basename, Qt::CaseInsensitive);
if (!found) // don't load the file if it does match the UI language but is not allowed to be used
continue;
+ } else if (!uiLanguage.startsWith(QFileInfo(filename).baseName(), Qt::CaseInsensitive)) {
+ continue; // do not load the file if it does not match the UI language
}
QScopedPointer<QTranslator> translator(new QTranslator(this));