Why QHash::iterator's operator+() was declared obsolet in 5.15?
Unsolved
General and Desktop
-
You can check the documentation yourself:
https://doc.qt.io/qt-5/qhash-iterator-obsolete.html#operator-2bThis operator is deprecated in order to align with std::unordered_map functionality.
So I don't think there is any substitution since this function is removed on purpose.
I think they just want to disable all the "backward" iterating functions of QHash (operator+() accepts negative values).
You can use QMap instead, or calling operator++() multiple times, as what operator+() with a positive value actually does.. -
The function simply makes no sense - QHash is unordered so what do you want from this operator?