[Development] Important recent changes in QList/QString/QByteArray
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Tue Sep 1 19:41:33 CEST 2020
Il 01/09/20 19:33, Thiago Macieira ha scritto:
> All non-const functions that may detach should be coded so they DO detach.
> That is, after any and all non-const functions, the refcount of the container
> should be 1.
This is the contract, and it's OK. I don't think however that this is
what was intended by OP. Rather, that calling a non-const function may
repack/reallocate a QCC (*), causing invalidation of all references and
iterators, even if the container was NOT shared in the first place.
Did I misunderstand the problem?
(*) Qt Contiguous Container
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200901/768862aa/attachment-0001.bin>
More information about the Development
mailing list