Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0, 5.3.0 Alpha
-
None
Description
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"