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

qUtf8Printable() should work for QStringView and QStringRef

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 5.15.8
    • None

    Description

      The following GoogleTest pretty printer does not compile:

      inline void PrintTo(QStringView string, ::std::ostream *os)
      {
        *os << qUtf8Printable(string);
      }
      

      One would expect qPrintable(), qUtf8Printable(), and qUtf16Printable() to work for all the Qt string classes.

      The workaround is to explicitly call QStringView::toUtf8() etc instead.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            rthompson Richard Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes