From e8c5fdfb567661faa1f466af69b06ae9610b839c Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 18 Feb 2023 19:39:37 +0100 Subject: [PATCH] Consider all QML files for translations Ensure QML files not used in the current build (as they're Qt-version-specific and a different Qt version is used) are still considered when generating the XML files for translations. Otherwise they will be showing as vanished or obsoleted when they shouldn't. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39f402b..8e8927f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,11 @@ endif () message(STATUS "Adding Qt-version-specific resource file \"${QML_FILE}\" to build") list(APPEND QML_SRC_FILES "${QML_FILE}") +# add other QML files to "EXCLUDED_FILES" so they're still considered for translations in any case +file(GLOB OTHER_QML_FILES "resources/qml*.qrc") +list(REMOVE_ITEM OTHER_QML_FILES ${QML_SRC_FILES}) +list(APPEND EXCLUDED_FILES ${OTHER_QML_FILES}) + # apply further configuration if (WIDGETS_GUI OR QUICK_GUI) include(QtGuiConfig)