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

Add QString::toStdU8String and toLocaleStdString()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.6, 6.0.1, 6.1.3, 6.2.0
    • None
    • All

    Description

      QString::toStdString should look like this:

      inline std::string QString::toStdString() const
      { return toLocal().toStdString(); }
      

      also,

      QString::toStdU8String is missing and should look like this:

      inline std::string QString::toStdU8String () const
      { return toUtf8().toStdString(); }
      

      for c++20:
      QString::toStdU8String is missing and should look like this:

      inline std::string QString::toStdU8String () const
      { return toUtf8().toStdU8String(); }
      

      This also applies for QString::fromStdString and QString::fromStdU8String.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            febbe Fabian Keßler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes