Giuseppe D'Angelo via Development wrote:
> 3) Unrelated to your problem, your code works in Qt 5, but in Qt 6 if
> the QHash gets modified in any way that'll invalidate your entire
> QVector you're keeping as a cache. If you want to future proof your code
> you'll need to redesign that.
This particular issue has come up so frequently in the last few weeks that
this behavior change in Qt 6 sounds like a major design flaw of the Qt 6
QHash to me. Also because it subtly breaks source compatibility in a way the
compiler cannot possibly detect, with the worst possible outcome (undefined
behavior). Only a sophisticated static analysis tool has any chance of
catching this, if a dedicated check is written.
Kevin Kofler
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development