Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.0, 6.9.0 FF
-
None
-
2
-
0d4fd5c54 (dev), 2d1b30286 (dev), 68cac07d5 (dev), 3dff1a3f7 (6.9), 12f39bb2a (6.9), 0e17856f6 (6.8), 88d9371d2 (6.8), 03f6f176b (dev), c52fc83d9 (tqtc/lts-6.5), 40434eec8 (tqtc/lts-6.2), 84cbcf52c (tqtc/lts-5.15)
-
Foundation Sprint 122, Foundation Sprint 123, Foundation Sprint 124
Description
https://doc.qt.io/qt-6/qset.html#unite says:
Each item in the other set that isn't already in this set is inserted into this set.
This is not what the implementation does:
for (const auto &e : std::as_const(other)) insert(e);
(Created QTBUG-132503 to deal with this).
Since https://codereview.qt-project.org/c/qt/qtbase/+/531872, which set is *this and which is other is now "random", a regression from 6.7.
By Hyrum's Law, users may have some to expect that unite() works as implemented, meaning that equivalent elements of other overwrite elements of *this. Restore the old behavior.
Attachments
Issue Links
- is cloned by
-
QTBUG-132536 QSet::intersect() picks equivalent elements inconsistently from `other` or *this
-
- Closed
-
- relates to
-
QTBUG-132503 QSet::unite docs don't match implementation
-
- Closed
-