Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.3.1
-
None
-
MacBook Pro (M1); Qt 6.2.2; QtCreator 7.0.0; Apple clang 13.0.0
-
-
3236b64db (dev), c13f15d08 (6.5), aa6339594 (dev), 37792e75d (tqtc/lts-6.2), b3ba4fe8d (6.5)
Description
Example code related to QHash::erase() yields a clazy warning:
Mixing iterators with const_iterators [clazy-strict-iterators]
Documentation:
https://github.com/KDE/clazy/blob/1.11/docs/checks/README-strict-iterators.md
I have tested 2 examples:
- 3rd example in the following section: https://doc.qt.io/qt-6/qhash-iterator.html#details
- Example in the following section: https://doc.qt.io/qt-6/qhash.html#erase
I haven't tested further examples related to QHash::erase() but it may be the case there too.
It may also be the case with erase() for other containers.
Is this an issue with the documentation or should there be a constructor of the following form?
const_iterator::const_iterator(iterator &other)
Attachments
For Gerrit Dashboard: QTBUG-105109 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
470269,1 | QtBase/doc: fix examples for QHash/QMap/QMultiMap::erase() | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: NEW | +2 | 0 |
467580,8 | QtBase/doc: fix examples for QHash/QMap/QMultiMap::erase() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
470265,2 | QtBase/doc: fix examples for QHash/QMap/QMultiMap::erase() | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
470965,3 | Fix qdoc warning about missing QMultiMap code snippet | dev | qt/qtbase | Status: MERGED | +2 | 0 |
471080,2 | Fix qdoc warning about missing QMultiMap code snippet | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
471088,2 | Fix qdoc warning about missing QMultiMap code snippet | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |