Skip to content

Rework removeParentMappings() to not rely on stable QHash iterators

Volker Krause requested to merge work/qt6-fix-selectionproxymodeltest into master

This worked in Qt5, but in Qt6 hash iterators are invalidated on modifications. Due to the recursion here we end up holding invalid iterators on the outer calls then. Fix this by first collecting all changes we need to perform, and then execute those without relying on iterators.

Fixes kselectionproxymodeltest with Qt6.

Merge request reports