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

Unexpected QString capacity value after one element insertion on Android

    XMLWordPrintable

Details

    • Android

    Description

      The simple test like:

      {
          QString a;
          a.insert(0, QChar(u'A'));
          QVERIFY(a.capacity() >= 3);  // Error!
      	
          a.append(QLatin1String("BC"));
          QCOMPARE(a, QLatin1String("ABC"));
      }
      

      fails with a.capacity() not being >= 3. This is only visible on Android and other platforms seem to be OK (e.g. Ubuntu/Windows).

      The logic of space allocation is not platform specific, so something interesting is happening on Android.

      Attachments

        Issue Links

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

          Activity

            People

              agolubev Andrei Golubev
              agolubev Andrei Golubev
              Maurice Kalinowski Maurice Kalinowski
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes