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

QByteArray: don't detach in insert()/append()/prepend()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • None

      After we've detected that we need to change the container in insert(), don't detach(). Instead, check if we're shared. If we're not shared, and we have sufficient capacity, do the change in-place. Otherwise, make a new container, copy the subset that forms the final result over, then assign the new container to *this.

      See epic for more details.

      Acceptance criteria: The following member functions no longer detach:

      • append() (all overloads)
      • insert() (all overloads)
      • prepend() (all overloads)
      • push_back()/push_front()

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

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes