[Development] Thread-safety on implicitly-shared classes

Thiago Macieira thiago.macieira at intel.com
Sun Feb 5 18:58:25 CET 2012


On Sunday, 5 de February de 2012 17.10.55, lars.knoll at nokia.com wrote:
> Yes, so we can either go through and clean them all up at once (best,
> since it might require API changes as with QString::utf16()), or introduce
> a new name for this kind of thread safety and document which classes work
> that way.

On the specific case of QString::utf16(), I also realised it breaks other 
contracts:

	const QString str(data);
	const QChar *const begin = str.constData();
	str.utf16(); // allowed, it's a const method

now begin might no longer be valid.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120205/99e30a70/attachment.sig>


More information about the Development mailing list