diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-04-04 13:50:21 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-05 01:44:34 +0200 |
commit | e5d10b2a3be77244d8db3a4dac86168ee9b91e6f (patch) | |
tree | e9f2a63e957d95fd2f10a62c772aaa993bdd9f79 /tests | |
parent | 7488b79652cb18de3e2b295835c08a46f3e286f4 (diff) |
Move growth computation to re-allocation function
Callers of QByteArray/QString::realloc() are still responsible for the
heuristics and decide whether to provide the "grow" hint, but
computation is centralized there.
With this change we also ensure growth takes into account the
terminating null. Previously, calls to qAllocMore took into account
header and string size, for left out the null, meaning we ended up
allocating ("nice-size" + Null).
Change-Id: Iad1536e7706cd2d446daee96859db9b01c5f9680
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions