[Development] QHash references stability in Qt6

Иван Комиссаров abbapoh at gmail.com
Thu Mar 18 16:04:50 CET 2021

Hello, when porting Qbs to Qt6 I’ve noticed a lot of bugs/crashes when using QHash. With Qt5 that was never a problem and simple change QHash -> std::unordered_map fixes those.

From what I understood all affected places rely on the fact that QHash in Qt5 (as well as std::unordered_map) guarantees that references are not invalidated even in case of re-hashing.

So I am wondering if this is the case with the new QHash implementation or is it just a bug (I could not find anything related on the bug tracker though)


More information about the Development mailing list