Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99320

lupdate/clang must not ignore all includes

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.4.0 Beta1
    • 6.2.2
    • Tools: Linguist
    • None
    • All
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lugerard Lucie Gerard
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes