[Development] qHash / QHash changes
Thiago Macieira
thiago.macieira at intel.com
Mon Mar 19 10:42:44 CET 2012
On segunda-feira, 19 de março de 2012 10.04.28, Mathias Hasselmann wrote:
> Am Montag, den 19.03.2012, 08:01 +0000 schrieb Giuseppe D'Angelo:
> > 2) Document to end users that it cannot be assumed that qHash output or
> > QHash iteration order are stable, so people must not rely on that.
>
> Would that be sufficient to prevent 3rd-party code relying on stable
> iteration order from breaking?
They shouldn't rely on that at all. The documentation of QHash says that it
produces an arbitrary but stable[1] order.
As for the QtDBus problem, I am really not aware of any place where I wrote
code that depended on a specific order. If that happened, it was an
unintentional mistake.
[1] note that the order is stable. Two hashing tables with the same elements
must produce the same order.
--
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/20120319/0da7e916/attachment.sig>
More information about the Development
mailing list