Obsolete Members for QHashIterator

以下成員源於類 QHashIterator 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(obsolete) bool findPrevious (const T & value )
(obsolete) bool hasPrevious () const
(obsolete) QHashIterator::Item peekPrevious () const
(obsolete) QHashIterator::Item previous ()

成員函數文檔編製

bool QHashIterator:: findPrevious (const T & value )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Deprecated in order to align with std::unordered_set functionality.

搜索 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.

另請參閱 findNext ().

bool QHashIterator:: hasPrevious () const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Deprecated in order to align with std::unordered_set functionality.

返迴 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 .

另請參閱 hasNext () 和 previous ().

QHashIterator::Item QHashIterator:: peekPrevious () const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Deprecated in order to align with std::unordered_set functionality.

Returns the previous item without moving the iterator.

調用 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.

另請參閱 hasPrevious (), previous (),和 peekNext ().

QHashIterator::Item QHashIterator:: previous ()

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Deprecated in order to align with std::unordered_set functionality.

Returns the previous item and moves the iterator back by one position.

調用 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.

另請參閱 hasPrevious (), peekPrevious (),和 next ().