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

[REG 5.15 -> 6.0] TR_EXCLUDE became too strict

    XMLWordPrintable

Details

    • 61ddd6a19 (dev), 9fc1bb8b9 (dev), 660d3338d (6.8), 3a5467e17 (6.8), 261bd1808 (6.7), 047fcf47b (6.7), 77958f814 (tqtc/lts-6.5)

    Description

      In commit https://codereview.qt-project.org/c/qt/qttools/+/295830, lupdate was ported from QRegExp to QRegularExpression.

      Before that change, a pattern like

      TR_EXCLUDE += /home/egon/dev/vcpkg/installed/x64-linux/include/*
      

      Would exclude files in the directory /home/egon/dev/vcpkg/installed/x64-linux/include and all subdirectories.

      The internal regular expression object looked like this:
       

      QRegExp(patternSyntax=1, pattern='"/home/egon/dev/vcpkg/installed/x64-linux/include/*"')
      

      After the said change, the produced regular expression would match only the directory because the regular expression is anchored:

      QRegularExpression("\\A(?:/home/egon/dev/vcpkg/installed/x64-linux/include/[^/]*)\\z", QRegularExpression::PatternOptions("NoPatternOption"))
      

      This makes the usage of QMake's TR_EXCLUDE and CMake's QT_EXCLUDE_SOURCES_FROM_TRANSLATION needlessly laborsome. See this comment in QTBUG-27936 for an example

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-127146
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: