Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.3.2, 6.4.0
-
None
-
c2aa05991d (qt/qtbase/dev) c2aa05991d (qt/tqtc-qtbase/dev) 9c027ac7ab (qt/qtbase/6.4) 87a8f36ff7 (qt/qtbase/6.4.1) 9c027ac7ab (qt/tqtc-qtbase/6.4) 87a8f36ff7 (qt/tqtc-qtbase/6.4.1) 87a8f36ff7 (qt/tqtc-qtbase/tqtc/qtinsight-6.4), 6453d17a0 (6.4)
Description
Hello,
With following CMakeLists.txt:
set(TS_FILES myapp_fr.ts) qt_add_executable(${PROJECT_NAME} [...] ) qt_add_translations(${PROJECT_NAME} TS_FILES ${TS_FILES} SOURCES ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_QML_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES ) qt_add_resources(${PROJECT_NAME} "translations" PREFIX "/i18n" BASE "${CMAKE_CURRENT_BINARY_DIR}" FILES "${QM_FILES}" ) [...]
Here is what happen with Qt 6.3.2:
- When ts file changes, qm file is properly refreshed
- However, qrc_translations.cpp is no longer rebuilt by "rcc"
It was previously working properly with Qt 6.3.1.
Issue seems to be related to a recent regression of Qt6LinguistToolsMacros.cmake, as commenting out the following code from qt6_add_lrelease fixes the issue:
set_source_files_properties("${qm}" ${scope_args} PROPERTIES _qt_resource_target_dependency "${target}_lrelease" )
When the code above is present, qt_add_ressources will end up adding lrelease dependency but will no longer add the ${qm} file itself to dependencies, which leads to the issue.
Best regards,
Louis
Attachments
Issue Links
- relates to
-
QTBUG-108113 "RCC: Cannot find file" in qt_add_translations
- Closed
For Gerrit Dashboard: QTBUG-107687 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
438676,9 | CMake: Fix qt_add_resources missing dependency regression | dev | qt/qtbase | Status: MERGED | +2 | 0 |
441130,11 | CMake: Add auto test for qt_add_resources dependency rebuilding | dev | qt/qtbase | Status: MERGED | +2 | 0 |
441310,2 | CMake: Fix qt_add_resources missing dependency regression | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
441311,2 | CMake: Fix qt_add_resources missing dependency regression | 6.4.1 | qt/qtbase | Status: MERGED | +2 | 0 |
446603,2 | CMake: Add auto test for qt_add_resources dependency rebuilding | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |