[Development] qHash / QHash changes
thiago.macieira at intel.com
Mon Mar 19 11:24:37 CET 2012
On segunda-feira, 19 de março de 2012 11.17.29, André Somers wrote:
> Op 19-3-2012 10:42, Thiago Macieira schreef:
> > They shouldn't rely on that at all. The documentation of QHash says
> > that it produces an arbitrary but stable order.
> >  note that the order is stable. Two hashing tables with the same
> > elements must produce the same order.
> If I understood Giuseppe correctly, the meaning of 'stable' will be
> limited to those hashes that have been initialized with the same seed,
> which by default is the case for hashes within the same process, but not
> for hashes created in different processes or in different runs of the
I'm not sure we want that then. It might be a security feature, but it's WAY
too late to add that to Qt 5.
It breaks the property of comparing QHashes item by item. That's probably the
property I relied on in the QtDBus unit tests in question.
The seed could be calculated once per process, instead.
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: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/development/attachments/20120319/0f08bb1f/attachment.bin
More information about the Development