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

lupdate ignores tr() call in a function with noexcept operator

    XMLWordPrintable

Details

    • macOS, Windows
    • 8b4dab1e4c (qt/tqtc-qttools/6.4) afbc20ed01 (qt/tqtc-qttools/dev) 8c60d2d288 (qt/tqtc-qttools/6.2) 18a38fe652 (qt/qttools/6.3) 18a38fe652 (qt/tqtc-qttools/6.3) 8c60d2d288 (qt/tqtc-qttools/6.2.5) 4b4f38d266 (qt/tqtc-qttools/5.15)

    Description

      In the following code, lupdate ignores tr().

      const QString TestBackend::getSomeText() const noexcept
      {
          return tr("Some text to translate");
      }
      

      It works fine if 'noexcept' keyword is not defined.

      A workaround is to explicitly define the class name like below

      TestBackend::tr("Some text to translate")
      

      Sample project is attached, qtbug99415-noexcept.zip .

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              nagrohn Nahomi Gröhn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews