Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.2
-
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
- resulted in
-
QTBUG-104426 lupdate uses return type as context for free functions
-
- Closed
-
For Gerrit Dashboard: QTBUG-91521 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
347381,13 | Correct search path for QT_TR_NOOP and Q_DECLARE_TR_NOOP signature | dev | qt/qttools | Status: MERGED | +2 | 0 |
354100,2 | Correct search path for QT_TR_NOOP and Q_DECLARE_TR_NOOP signature | 6.2 | qt/qttools | Status: MERGED | +2 | 0 |
384635,4 | lupdate: Fix static initializers with parentheses | dev | qt/qttools | Status: MERGED | +2 | 0 |
417227,3 | lupdate: Apply a simpler fix for static initializers | dev | qt/qttools | Status: MERGED | +2 | 0 |
417877,2 | lupdate: Apply a simpler fix for static initializers | 6.4 | qt/qttools | Status: MERGED | +2 | 0 |
418310,4 | lupdate: Apply a simpler fix for static initializers | 6.3 | qt/qttools | Status: MERGED | +2 | 0 |