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

wrong xxx_lupdate_project.json is generated when no targets are specified in qt6_add_lupdate

    XMLWordPrintable

Details

    • Windows
    • c12750987 (dev), 66bed97bf (6.7), eb725df39 (6.7.0)

    Description

      When I add a translation in my project with code below:

      qt6_add_lupdate(
          TS_FILES ts/xxxx.ts
          SOURCES ${ts_src}
          OPTIONS -no-obsolete) 

      generated xxx_lupdate_project.json:

      {
        ...
        "subProjects": [
          {
            "projectFile": "/CMakeLists.txt",
            "includePaths": [  ],
            "sources": [  ],
            "excluded": [  ]
          }
          {
            "projectFile": "/CMakeLists.txt",
            "includePaths": [  ],
            "sources": [  ],
            "excluded": [  ]
          }
        ]
      } 

      No subProjects should be generated here.

      I found code in .../Qt6LinguistTools/GenerateLUpdateProject.cmake, line 116:

      foreach(i RANGE 1 ${lupdate_subproject_count}) 

      It also loops for twice when lupdate_subproject_count is 0.

       

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            mapleroid mapleroid
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes