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

Details

    • 2c9228973fc212db044add557839b15a8cb483c3

    Description

      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.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-21872
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes