summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-09 11:47:03 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-09-10 23:27:15 +0200
commit5678ee93b428e57983b5bc698bcba27dfb56960b (patch)
treea017c9ca4fc6a411d79f8ef33b8f5aa6f58cba1b /mkspecs
parentd7b02e8cbf82a73101fafed614a333955fa93bc9 (diff)
Fix .qm file name calculation in lrelease.prf
The following snippet in a .pro file resulted in a build error: CONFIG += lrelease embed_translations TRANSLATIONS += foo.bar_de.ts The variable QM_FILES was incorrectly calculated. The extra compiler that calls lrelease uses QMAKE_FILE_IN_BASE, which wraps QFileInfo::completeBaseName(), resulting in "foo.bar_de.qm". The $$replace call that calculates the .qm file name however, produces "foo.qm". Fix this mismatch by adjusting the regular expression to behave like QFileInfo::completeBaseName(). Pick-to: 5.15 6.2 Fixes: QTBUG-79016 Change-Id: I545d1b58170cd5229007faf31c9b2c6f70ff75a6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/lrelease.prf2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/features/lrelease.prf b/mkspecs/features/lrelease.prf
index f611c74184..15d336d8e5 100644
--- a/mkspecs/features/lrelease.prf
+++ b/mkspecs/features/lrelease.prf
@@ -24,7 +24,7 @@ all_translations = $$TRANSLATIONS $$EXTRA_TRANSLATIONS
for (translation, all_translations) {
# mirrors $$LRELEASE_DIR/${QMAKE_FILE_IN_BASE}.qm above
translation = $$basename(translation)
- QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\..*$, .qm)
+ QM_FILES += $$OUT_PWD/$$LRELEASE_DIR/$$replace(translation, \\.[^.]+$, .qm)
}
embed_translations {
qmake_qm_files.files = $$QM_FILES