Obsolete Members for QHashIterator
The following members of class QHashIterator are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
(obsolete) bool | findPrevious(const T &value) |
(obsolete) bool | hasPrevious() const |
(obsolete) QHashIterator::Item | peekPrevious() const |
(obsolete) QHashIterator::Item | previous() |
Member Function Documentation
bool QHashIterator::findPrevious(const T &value)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Deprecated in order to align with std::unordered_set functionality.
Searches for value starting from the current iterator position backward. Returns true
if a (key, value) pair with value value is found; otherwise returns false
.
After the call, if value was found, the iterator is positioned just before the matching item; otherwise, the iterator is positioned at the front of the container.
See also findNext().
bool QHashIterator::hasPrevious() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Deprecated in order to align with std::unordered_set functionality.
Returns true
if there is at least one item behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns false
.
See also hasNext() and previous().
QHashIterator::Item QHashIterator::peekPrevious() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Deprecated in order to align with std::unordered_set functionality.
Returns the previous item without moving the iterator.
Call key() on the return value to obtain the item's key, and value() to obtain the value.
Calling this function on an iterator located at the front of the container leads to undefined results.
See also hasPrevious(), previous(), and peekNext().
QHashIterator::Item QHashIterator::previous()
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Deprecated in order to align with std::unordered_set functionality.
Returns the previous item and moves the iterator back by one position.
Call key() on the return value to obtain the item's key, and value() to obtain the value.
Calling this function on an iterator located at the front of the container leads to undefined results.
See also hasPrevious(), peekPrevious(), and next().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.