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

CMake error "Too many parentheses." on qt_add_lupdate

    XMLWordPrintable

Details

    • d39e9f21c (dev), 98d822d1b (6.7)

    Description

      Since https://codereview.qt-project.org/c/qt/qttools/+/533986, having a lot of UI file sources in a target results in Qt generating a regex with a lot of alternatives when using qt_add_lupdate. CMake doesn't like that and prints this error when running `make update_translations`:

      $ make update_translations 
      RegularExpression::compile(): Too many parentheses.
      RegularExpression::compile(): Error in compile.
      CMake Error at /usr/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake:40 (list):
        list sub-command FILTER, mode REGEX failed to compile regex
        "(/ui_adduserprefixdialog\.h$)|(/ui_routesetdialog\.h$)|(/ui_routingtabledialog\.h$)|(/ui_routingtablewidget\.h$)|(/ui_sitesettingsdialog\.h$)|(/ui_changelanguagedialog\.h$)|(/ui_changepassworddialog\.h$)|(/ui_ftpdialog\.h$)|(/ui_ftpdialog\.h$)|(/ui_logindialog\.h$)|(/ui_logwidget\.h$)|(/ui_mainwindow\.h$)|(/ui_mapframe\.h$)|(/ui_mapperspectivewidget\.h$)|(/ui_siteinfodialog\.h$)|(/ui_sitesperspectivewidget\.h$)|(/ui_useradministrationdialog\.h$)|(/ui_userdialog\.h$)|(/ui_activealarmspropertieswidget\.h$)|(/ui_boolpropertyeditor\.h$)|(/ui_gaterequestsmemorydialog_g3\.h$)|(/ui_propertieswidgetgate_g3\.h$)|(/ui_propertieswidgetroutingtable_g3\.h$)|(/ui_propertieswidgettc_g3\.h$)|(/ui_propertieswidgetzone_g3\.h$)|(/ui_safetymanagerwidget_g3\.h$)|(/ui_gaterequestsmemorydialog\.h$)|(/ui_propertieswidgettunnelhel002\.h$)|(/ui_propertieswidgettunnelhel002zoned\.h$)|(/ui_propertieswidgetvecommilano\.h$)|(/ui_propertieswidgetawa\.h$)|(/ui_propertieswidgetbuscontroller\.h$)|(/ui_propertieswidgetdoor\.h$)|(/ui_propertieswidgetdrr\.h$)|(/ui_propertieswidgetelbox\.h$)|(/ui_propertieswidgetelboxfuse\.h$)|(/ui_propertieswidgetelboxheating\.h$)|(/ui_propertieswidgetelboxups\.h$)|(/ui_propertieswidgetgate\.h$)|(/ui_propertieswidgetgpin\.h$)|(/ui_propertieswidgetgpio\.h$)|(/ui_propertieswidgetgpout\.h$)|(/ui_propertieswidgetheatingcontactornew\.h$)|(/ui_propertieswidgetheatingcontactoros4p\.h$)|(/ui_propertieswidgetheatinggroup\.h$)|(/ui_propertieswidgetheatinggroupnew\.h$)|(/ui_propertieswidgetheatingrod\.h$)|(/ui_propertieswidgetheatingrodnew\.h$)|(/ui_propertieswidgetksw\.h$)|(/ui_propertieswidgetmps\.h$)|(/ui_propertieswidgetoccupationdetector\.h$)|(/ui_propertieswidgetoclsection\.h$)|(/ui_propertieswidgetpd\.h$)|(/ui_propertieswidgetpme\.h$)|(/ui_propertieswidgetpmm\.h$)|(/ui_propertieswidgetroute\.h$)|(/ui_propertieswidgetroutingtable\.h$)|(/ui_propertieswidgetsafetycpu\.h$)|(/ui_propertieswidgetsegment\.h$)|(/ui_propertieswidgetsignal\.h$)|(/ui_propertieswidgetsts\.h$)|(/ui_propertieswidgetsymbol\.h$)|(/ui_propertieswidgetsystem\.h$)|(/ui_propertieswidgettc\.h$)|(/ui_propertieswidgettdiloop\.h$)|(/ui_propertieswidgetvecomcontroller\.h$)|(/ui_propertieswidgetvecomloop\.h$)|(/ui_propertieswidgetvecomtc\.h$)|(/ui_propertieswidgetvetra\.h$)|(/ui_propertieswidgetvirtualtc\.h$)|(/ui_propertieswidgetzeccontroller\.h$)|(/ui_propertieswidgetzone\.h$)|(/ui_safetymanagerwidget\.h$)|(/ui_conv50elsettingsdialog\.h$)|(/ui_propertieswidgetconv50el\.h$)|(/ui_createsitewidgetdialog\.h$)|(/ui_currentiteminfowidget\.h$)|(/ui_datetimeinputdialog\.h$)|(/ui_propertieswidgetdisconcabinet\.h$)|(/ui_propertieswidgetdisconcabinetfuse\.h$)|(/ui_propertieswidgetdisconcabinetups\.h$)|(/ui_propertieswidgetdiscondrive\.h$)|(/ui_propertieswidgetdiscongpio\.h$)|(/ui_propertieswidgetdisconoclsection\.h$)|(/ui_propertieswidgetdisconrfid\.h$)|(/ui_propertieswidgetdisconvoltagefreelamp\.h$)|(/ui_propertieswidgetdisconvoltmeter\.h$)|(/ui_dlggetsinceuntil\.h$)|(/ui_doublepropertyeditor\.h$)|(/ui_genericpropertieswidget\.h$)|(/ui_historysitewidget\.h$)|(/ui_integerpropertyeditor\.h$)|(/ui_livesitewidget\.h$)|(/ui_propertieswidgetcontainer\.h$)|(/ui_sitedeviceswidget\.h$)|(/ui_propertieswidgetstcppi\.h$)|(/ui_propertieswidgetstctc\.h$)|(/ui_svgwidget\.h$)|(/ui_propertieswidgettscheating\.h$)|(/ui_propertieswidgettscheating\.h$)|(/ui_propertieswidgettsczone\.h$)|(/ui_propertieswidgettsczone\.h$)".
      Call Stack (most recent call first):
        /usr/lib/cmake/Qt6LinguistTools/GenerateLUpdateProject.cmake:75 (filter_generated_ui_headers)
      

      The regex is created in the filter_generated_ui_headers function here: https://code.qt.io/cgit/qt/qttools.git/tree/src/linguist/GenerateLUpdateProject.cmake#n65

      One solution would be to remove the files one by one. However, I'm not sure why I even need to specify the UI files in my target in the first place. If I don't, all my translation strings disappear, because qt6_add_lupdate doesn't detect the ui files by itself, but otherwise, UI files are detected with AUTOUIC for actual UI purposes.

      Attachments

        1. qtbug_123995.zip
          61 kB
          Joerg Bornemann

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              syyyr Václav Kubernát
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes