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

QSet: don't detach in remove()/erase()

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • None
    • 8
    • 3a284dc19 (dev), 605a20b26 (6.9), 4299115fe (6.8), e1efc67bc (tqtc/lts-6.5), 162015e9c (dev), eb13efc4a (6.9), eb10876c7 (6.8), 027e80bfd (tqtc/lts-6.5)

    Description

      After we've detected that we need to change the container in remove()/erase(), don't detach(). Instead, check if we're shared. If we're not shared, do the change in-place. If we are shared, make a new container, copy only 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:

      • clear()
      • erase() (all overloads, cf. QTBUG-106180)
      • intersect()
      • remove()
      • subtract()
      • unite()

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated: