Details
-
Task
-
Resolution: Done
-
P2: Important
-
6.2.2
-
None
-
-
dfbf5244f1 (qt/qttools/dev) dfbf5244f1 (qt/tqtc-qttools/dev)
Description
Problem
When using the clang-based lupdate with a compile_commands.json, lupdate currently skips all header files that are included by the .cpp files in compile_commands.json.
This is done to skip system and library headers that do not belong to the project for performance reasons mostly.
To handle translations in header files, one must pass the headers explictly in a file list to lupdate. That fails if the header file is not compilable in itself, which is probably the usual case.
Solution
Introduce a notion of project root(s) and skip only header files that outside of all project roots.
This way, passing a compile_commands.json (possibly together with project roots) is a sufficient description of the project. Header files don't have to be passed anymore to lupdate.
This also solves the problem that header files are not necessarily mentioned in CMake projects.