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

qt_add_translations() fails if there are many files

    XMLWordPrintable

Details

    Description

      It seems to be constructing a regex, but it seems to have a limit how big it can get. To reproduce configure attached example, then run:

      cmake --build . -t update_translations
      
      FAILED: CMakeFiles/widgetcmake_lupdate /home/user/work/tests/widgetcmake/build/Desktop_Qt_6_7_0_64-Debug/CMakeFiles/widgetcmake_lupdate 
      cd /home/user/work/tests/widgetcmake/build/Desktop_Qt_6_7_0_64-Debug && /usr/bin/cmake -DIN_FILE=/home/user/work/tests/widgetcmake/build/Desktop_Qt_6_7_0_64-Debug/.lupdate/widgetcmake_lupdate_project.cmake -DOUT_FILE=/home/user/work/tests/widgetcmake/build/Desktop_Qt_6_7_0_64-Debug/.lupdate/widgetcmake_lupdate_project.json -P /home/user/Qt/6.7.0/gcc_64/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake && /home/user/Qt/6.7.0/gcc_64/bin/lupdate -project /home/user/work/tests/widgetcmake/build/Desktop_Qt_6_7_0_64-Debug/.lupdate/widgetcmake_lupdate_project.json
      CMake Error at /home/user/Qt/6.7.0/gcc_64/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake:65 (list):
        list sub-command FILTER, mode REGEX failed to compile regex
        "(/ui_form1\.h$)|(/ui_form2\.h$)|(/ui_form3\.h$)|(/ui_form4\.h$) <snip>
      
      Call Stack (most recent call first):
        /home/user/Qt/6.7.0/gcc_64/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake:74 (filter_generated_ui_headers)
        /home/user/Qt/6.7.0/gcc_64/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake:123 (prepare_json_sources)
      
      RegularExpression::compile(): Too many parentheses.
      RegularExpression::compile(): Error in compile.
      

      Attachments

        1. qtbug124819.zip
          4.99 MB
          Joni Poikelin

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              poikelin Joni Poikelin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes