On Monday, 5 February 2024 01:36:39 PST Marc Mutz via Development wrote: > I've always understood it such that we as Qt must preserve the property > that the hash for equal elements is equal within _one_ run of _one_ > process. This means you can use the hash in I/O in any way. That's why > we have qt_hash, which you _can_ (and do) use in I/O (but is private > API, AFAIK). I never thought that a hash seed of zero would change that, > but of course users may have come to depend on this (Hyrum's Law), so a > [ChangeLog] would be in order.
In commit e3f05981cbeb0b7721f960ef88effa77be2af5ce, I added this comment to qHashBits: // mix in the length as a secondary seed. For seed == 0, seed2 must be // size, to match what we used to do prior to Qt 6.2. Which is why I am asking now, because making this change would go against that comment. But there was no discussion in the change about whether this was correct or not. It seems I just write it like that. However, that was qHashBits(). The change I'm talking about is qHash(QLatin1StringView), specifically so it won't call qHashBits(). -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development