Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
None
Description
Currently if a QObject::tr is wrapped in a function lupdate will report "tr() cannot be called without context".
Suggestion: Make lupdate recognize the context from the wrapper function.
Example:
/*The inline tr() function sets up the string inside for translation. This is a shorter representation for of the static member QObject::tr () for use outside of a QObject derived class or C-style function. */ inline QString tr(const char* sourceText, const char* disambiguation = nullptr, int n = -1) { return QObject::tr (sourceText, disambiguation, n); }