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

When calling lupdate on a file that uses QT_TR_NOOP in a constructor for a static QString it will fail to find the context

    XMLWordPrintable

Details

    • f233ad9102e79a1e1d7f619eff5aa55343f572ee (qt/qttools/dev)

    Description

      When calling lupdate on a file that uses QT_TR_NOOP in a constructor for a static QString it will fail to find the context. So a line like:

      const QString MyClass::str1( QT_TR_NOOP( "Produces warning" ) );
      

      will output:

      tr() cannot be called without context
      

      when using lupdate. Whereas if the result of QT_TR_NOOP is used in an assignment to the QString in the same location it is fine.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              andysh Andy Shaw
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: