From 5678ee93b428e57983b5bc698bcba27dfb56960b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 9 Sep 2021 11:47:03 +0200 Subject: 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 --- mkspecs/features/lrelease.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') 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 -- cgit v1.2.3