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

lupdate generates errors for tr() marked strings in template specializations

XMLWordPrintable

    • 3a9bc99b1 (dev), 49a442e6a (dev)

      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.

        1. Helper.cpp
          0.8 kB
          Lysandra Sola
        2. Helper.h
          0.4 kB
          Lysandra Sola
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            masoud.jami Masoud Jami
            lysandra.sola Lysandra Sola
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes