Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
8
-
2753924fc (dev), a5bafadf8 (6.9), 7e53636c5 (6.8)
Description
After we've detected that we need to change the container in replace(), don't detach(). Instead, check if we're shared. If we're not shared, and the replacee is larger than the replacer, 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:
- replace() (all overloads)
Attachments
Issue Links
- split to
-
QTBUG-133737 QByteArray::replace() is not linear when replacement.size() > needle.size()
-
- Open
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-106185 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
624330,5 | QByteArray: optimize replace(char, char) | dev | qt/qtbase | Status: MERGED | +2 | 0 |
624896,2 | QByteArray: optimize replace(char, char) | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
625363,2 | QByteArray: optimize replace(char, char) | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |