-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.2.0, 5.3.0 Alpha
-
Fix Version/s: 5.3.0 RC1
-
Component/s: Core: Containers and Algorithms
-
Labels:None
QByteArray shrinks its size, when its data is shared.
When it's not shared it does nothing, like other containers, too.
QByteArray test("0123456789"); QByteArray copy = test; copy.reserve(5); test.reserve(5); qDebug() << "test: " << test; qDebug() << "copy: " << copy;
Output:
test: "0123456789" copy: "01234"
For Gerrit Dashboard: QTBUG-37750 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
81696,2 | Fix capacity reservation for shared QByteArray | stable | qt/qtbase | Status: MERGED | +2 | 0 |