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

qUtf8Printable() should work for QStringView and QStringRef

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes