diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-09-09 11:47:03 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-14 13:19:49 +0000 |
commit | 422f14d170567396732a01ccae3705529d4e6ddc (patch) | |
tree | 28a75135270a69e17474c9e752b91abcd1fb3903 /mkspecs | |
parent | 56a2a0f21affff66653c457f24fe72e89b7a2af3 (diff) | |
download | qtbase-422f14d170567396732a01ccae3705529d4e6ddc.tar.gz |
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().
Fixes: QTBUG-79016
Change-Id: I545d1b58170cd5229007faf31c9b2c6f70ff75a6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5678ee93b428e57983b5bc698bcba27dfb56960b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/lrelease.prf | 2 |
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 |