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

Add qTrId() alias for qtTrId()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.9
    • Tools: Linguist
    • None
    • All

    Description

      For id-based translations in C++ code we have the function qtTrId. It was introduced with the following comment:

      // Defined in qcoreapplication.cpp
      // The better name qTrId() is reserved for an upcoming function which would
      // return a much more powerful QStringFormatter instead of a QString.
      Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
      

      QStringFormatter never materialized, though. See https://lists.qt-project.org/pipermail/development/2017-August/030677.html

      Standard C++ has std::format now, but it's questionable whether qTrId should wrap it or aid format strings in another way.

      Consider adding qTrId as alias for qtTrId.
      Or at least remove the comment.

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes