Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20885 Larger changes for Qt 5
  3. QTBUG-21872

[API] Deprecate QString::fromAscii, QString::toAscii, add QString::fromCString, QString::toCString

XMLWordPrintable

    • 2c9228973fc212db044add557839b15a8cb483c3

      Please consider deprecating QString::fromAscii, QString::toAscii in Qt5, and replace them by properly named QString::fromCString, QString::toCString methods.

      As the documentation already states, fromAscii, toAscii isn't actually expecting or generating ASCII character strings. Instead, it's using whatever encoding is specified by QTextCodec::setCodecForCStrings() (which happens to have Latin-1 as default). If you set an ASCII incompatible codec it can happen that fromAscii, toAscii actually rejects QByteArray's in ASCII.

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

            thiago Thiago Macieira
            kkohne Kai Köhne
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes