Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.18, 6.5.8, 6.8.1
Description
lupdate fails with "tr() cannot be called without context" error or assigns incorrect translation context for translatable strings marked with QObject::tr() when the template functions definitions for the template specialization are located in the source file instead of the header file.
lupdate correctly generates the ts file and the errors do not occur when QCoreApplication::translate() is used.
Attached example reproduces the issue.