Uploaded image for project: 'Qt Project Website'
  1. Qt Project Website
  2. QTWEBSITE-1078

QStringLiteral documentation still uses 'u' and has a caveat on it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None
    • None

    Description

      Minor issue but has led to some confusion.

      Documentation still has https://doc.qt.io/qt-6/qstring.html#QStringLiteral using the 'u' literal but from the code it seems it is always added anyway:

      https://github.com/qt/qtbase/blob/6.4.1/src/corelib/text/qstringliteral.h

      https://github.com/qt/qtbase/blob/5.15.2/src/corelib/text/qstringliteral.h

      Is this note still valid?

      Note: Some compilers have bugs encoding strings containing characters outside the US-ASCII character set. Make sure you prefix your string with u in those cases. It is optional otherwise.

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            ctummon Cathal Tummon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes