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

QString::toUcs4() returns incorrect value

    XMLWordPrintable

Details

    • 996db96d5eb4927a130605e8c1820d7e1b303191

    Description

      QString::toUcs4() returns incorrectly resized QVector against non-BMP characters.

      The following code can be used to reproduce the issue

      const uint kData[] = { 0x10000 };
      QString test = QString::fromUcs4(kData, 1);
      const QVector<uint> ucs4s = test.toUcs4();
      if (ucs4s.size() == 1) {
          qDebug() << "correct";
      } else {
          qDebug() << "wrong";
      }
      

      This was working correctly with Qt 4.7, it got broken with SHA 2916b0749902ee51a3deab982e53189e72c3b693

      Attachments

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

        Activity

          People

            ritt.ks Konstantin Ritt
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes