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

    • f233ad9102e79a1e1d7f619eff5aa55343f572ee (qt/qttools/dev)

      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.

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

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

              Created:
              Updated:
              Resolved: