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

change return type of QLocale::languageToString from QString to QLatin1String.

    XMLWordPrintable

Details

    Description

      suppose code:

      static inline QString locname(const QLocale::Language i)
      {
          return QString::fromLocal8Bit(dgettext("iso_639", QLocale::languageToString(i).toLatin1().constData()));
      }
      

      it convert QLatin1String inside languageToString() into QString, and then (in my code) it conerts back to QLatin1String. Why not remove internal conversion fromQLatin1String to QString ?

      Also, if returned string is always non-internationalized string, it is more clear to set return value QLatin1String.

      Attachments

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

        Activity

          People

            earthdomain Earth Domain (Inactive)
            socketpair@gmail.com Коренберг Марк
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes