- 
    
Task
 - 
    Resolution: Unresolved
 - 
    
P2: Important
 - 
    None
 - 
    None
 - 
    None
 
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)
 - fill()
 - pop_back()/pop_front()/removeFirst()/removeLast()
 - remove()/removeAll()/removeIf()/removeOne()
 - takeAt()/takeFirst()/takeLast()
 - if QTBUG-106165 is implemented meanwhile: assign()
 
| For Gerrit Dashboard: QTBUG-106169 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 443125,4 | Sequential containers, don't detach in removeIf()/erase_if() | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |