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

static_cast<> throws off lupdate's parsing of QCoreApplication::translate()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.10.0 FF
    • 5.12.8
    • Tools: Linguist
    • None
    • Linux/Wayland
    • aa5105770 (dev)

    Description

      When trying to translate a string with QCoreApplication::translate() using the plural forms, lupdate doesn't see it.
      For example, 
       

      QCoreApplication::translate("Context", "[A] removed %n item(s)", "", static_cast<int>(items));
      

      doesn't show up in QtLinguist after running lupdate. However, 

      QCoreApplication::translate("Context", "[A] removed [B] item(s)");
      

      works well.
      Using tr() works fine.

      Attachments

        Issue Links

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

          Activity

            People

              masoud.jami Masoud Jami
              mickael.reporting Mickaël Da Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes