Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\inmodule QtCore More...
#include <qhash.h>
Classes | |
class | const_iterator |
\inmodule QtCore More... | |
class | iterator |
\inmodule QtCore More... | |
class | key_iterator |
\inmodule QtCore More... | |
Public Types | |
using | key_type = Key |
Typedef for Key. | |
using | mapped_type = T |
Typedef for T. | |
using | value_type = T |
using | size_type = qsizetype |
Typedef for int. | |
using | difference_type = qsizetype |
Typedef for ptrdiff_t. | |
using | reference = T & |
using | const_reference = const T & |
typedef QKeyValueIterator< const Key &, const T &, const_iterator > | const_key_value_iterator |
\inmodule QtCore | |
typedef QKeyValueIterator< const Key &, T &, iterator > | key_value_iterator |
\inmodule QtCore | |
typedef iterator | Iterator |
Qt-style synonym for QHash::iterator. | |
typedef const_iterator | ConstIterator |
Qt-style synonym for QHash::const_iterator. | |
Public Member Functions | |
QHash () noexcept=default | |
Constructs an empty hash. | |
QHash (std::initializer_list< std::pair< Key, T > > list) | |
QHash (const QHash &other) noexcept | |
Constructs a copy of other. | |
~QHash () | |
Destroys the hash. | |
QHash & | operator= (const QHash &other) noexcept(std::is_nothrow_destructible< Node >::value) |
Assigns other to this hash and returns a reference to this hash. | |
QHash (QHash &&other) noexcept | |
Move-constructs a QHash instance, making it point at the same object that other was pointing to. | |
template<typename InputIterator , QtPrivate::IfAssociativeIteratorHasKeyAndValue< InputIterator > = true> | |
QHash (InputIterator f, InputIterator l) | |
template<typename InputIterator , QtPrivate::IfAssociativeIteratorHasFirstAndSecond< InputIterator > = true> | |
QHash (InputIterator f, InputIterator l) | |
void | swap (QHash &other) noexcept |
template<typename AKey = Key, typename AT = T> | |
QTypeTraits::compare_eq_result_container< QHash, AKey, AT > | operator== (const QHash &other) const noexcept |
Returns true if other is equal to this hash; otherwise returns false. | |
template<typename AKey = Key, typename AT = T> | |
QTypeTraits::compare_eq_result_container< QHash, AKey, AT > | operator!= (const QHash &other) const noexcept |
Returns true if other is not equal to this hash; otherwise returns false . | |
qsizetype | size () const noexcept |
Returns the number of items in the hash. | |
bool | isEmpty () const noexcept |
Returns true if the hash contains no items; otherwise returns false. | |
qsizetype | capacity () const noexcept |
Returns the number of buckets in the QHash's internal hash table. | |
void | reserve (qsizetype size) |
Ensures that the QHash's internal hash table has space to store at least size items without having to grow the hash table. | |
void | squeeze () |
Reduces the size of the QHash's internal hash table to save memory. | |
void | detach () |
bool | isDetached () const noexcept |
bool | isSharedWith (const QHash &other) const noexcept |
void | clear () noexcept(std::is_nothrow_destructible< Node >::value) |
Removes all items from the hash and frees up all memory used by it. | |
bool | remove (const Key &key) |
Removes the item that has the key from the hash. | |
template<typename Predicate > | |
qsizetype | removeIf (Predicate pred) |
T | take (const Key &key) |
Removes the item with the key from the hash and returns the value associated with it. | |
bool | contains (const Key &key) const noexcept |
Returns true if the hash contains an item with the key; otherwise returns false . | |
qsizetype | count (const Key &key) const noexcept |
Returns the number of items associated with the key. | |
Key | key (const T &value) const noexcept |
Key | key (const T &value, const Key &defaultKey) const noexcept |
T | value (const Key &key) const noexcept |
T | value (const Key &key, const T &defaultValue) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the value associated with the key. | |
T & | operator[] (const Key &key) |
Returns the value associated with the key as a modifiable reference. | |
const T | operator[] (const Key &key) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as value(). | |
QList< Key > | keys () const |
Returns a list containing all the keys in the hash, in an arbitrary order. | |
QList< Key > | keys (const T &value) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list containing all the keys associated with value value, in an arbitrary order. | |
QList< T > | values () const |
Returns a list containing all the values in the hash, in an arbitrary order. | |
iterator | begin () |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash. | |
const_iterator | begin () const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const_iterator | cbegin () const noexcept |
const_iterator | constBegin () const noexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash. | |
iterator | end () noexcept |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash. | |
const_iterator | end () const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const_iterator | cend () const noexcept |
const_iterator | constEnd () const noexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash. | |
key_iterator | keyBegin () const noexcept |
key_iterator | keyEnd () const noexcept |
key_value_iterator | keyValueBegin () |
key_value_iterator | keyValueEnd () |
const_key_value_iterator | keyValueBegin () const noexcept |
const_key_value_iterator | constKeyValueBegin () const noexcept |
const_key_value_iterator | keyValueEnd () const noexcept |
const_key_value_iterator | constKeyValueEnd () const noexcept |
auto | asKeyValueRange () & |
auto | asKeyValueRange () const & |
auto | asKeyValueRange () && |
auto | asKeyValueRange () const && |
iterator | erase (const_iterator it) |
std::pair< iterator, iterator > | equal_range (const Key &key) |
std::pair< const_iterator, const_iterator > | equal_range (const Key &key) const noexcept |
qsizetype | count () const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as size(). | |
iterator | find (const Key &key) |
Returns an iterator pointing to the item with the key in the hash. | |
const_iterator | find (const Key &key) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const_iterator | constFind (const Key &key) const noexcept |
iterator | insert (const Key &key, const T &value) |
Inserts a new item with the key and a value of value. | |
void | insert (const QHash &hash) |
template<typename ... Args> | |
iterator | emplace (const Key &key, Args &&... args) |
template<typename ... Args> | |
iterator | emplace (Key &&key, Args &&... args) |
Inserts a new element into the container. | |
float | load_factor () const noexcept |
Returns the current load factor of the QHash's internal hash table. | |
size_t | bucket_count () const noexcept |
bool | empty () const noexcept |
This function is provided for STL compatibility. | |
Static Public Member Functions | |
static float | max_load_factor () noexcept |
static size_t | max_bucket_count () noexcept |
Friends | |
class | QSet< Key > |
class | QMultiHash< Key, T > |
class | iterator |
class | const_iterator |
Related Symbols | |
(Note that these are not member symbols.) | |
size_t | qHash (const QUrl &url, size_t seed) noexcept |
Returns the hash value for the url. | |
size_t | qHash (const QDateTime &key, size_t seed=0) |
size_t | qHash (QDate key, size_t seed=0) |
size_t | qHash (QTime key, size_t seed=0) |
template< typename T1, typename T2 > size_t | qHash (const std::pair< T1, T2 > &key, size_t seed=0) |
template< typename... T > size_t | qHashMulti (size_t seed, const T &...args) |
template< typename... T > size_t | qHashMultiCommutative (size_t seed, const T &...args) |
template< typename InputIterator > size_t | qHashRange (InputIterator first, InputIterator last, size_t seed=0) |
template< typename InputIterator > size_t | qHashRangeCommutative (InputIterator first, InputIterator last, size_t seed=0) |
size_t | qHashBits (const void *p, size_t len, size_t seed=0) |
size_t | qHash (char key, size_t seed=0) |
size_t | qHash (uchar key, size_t seed=0) |
size_t | qHash (signed char key, size_t seed=0) |
size_t | qHash (ushort key, size_t seed=0) |
size_t | qHash (short key, size_t seed=0) |
size_t | qHash (uint key, size_t seed=0) |
size_t | qHash (int key, size_t seed=0) |
size_t | qHash (ulong key, size_t seed=0) |
size_t | qHash (long key, size_t seed=0) |
size_t | qHash (quint64 key, size_t seed=0) |
size_t | qHash (qint64 key, size_t seed=0) |
size_t | qHash (quint128 key, size_t seed=0) |
size_t | qHash (qint128 key, size_t seed=0) |
size_t | qHash (char8_t key, size_t seed=0) |
size_t | qHash (char16_t key, size_t seed=0) |
size_t | qHash (char32_t key, size_t seed=0) |
size_t | qHash (wchar_t key, size_t seed=0) |
size_t | qHash (float key, size_t seed=0) noexcept |
size_t | qHash (double key, size_t seed) noexcept |
size_t | qHash (long double key, size_t seed) noexcept |
size_t | qHash (const QChar key, size_t seed=0) |
size_t | qHash (const QByteArray &key, size_t seed=0) |
size_t | qHash (const QByteArrayView &key, size_t seed=0) |
size_t | qHash (const QBitArray &key, size_t seed=0) |
size_t | qHash (const QString &key, size_t seed=0) |
size_t | qHash (QLatin1StringView key, size_t seed=0) |
template< class T > size_t | qHash (const T *key, size_t seed=0) |
size_t | qHash (std::nullptr_t key, size_t seed=0) |
template< typename T > bool | qHashEquals (const T &a, const T &b) |
template< class Key, class T > QDataStream & | operator<< (QDataStream &out, const QHash< Key, T > &hash) |
Writes the hash hash to stream out. | |
template< class Key, class T > QDataStream & | operator>> (QDataStream &in, QHash< Key, T > &hash) |
Reads a hash from stream in into hash. | |
template< class Key, class T > size_t | qHash (const QHash< Key, T > &key, size_t seed=0) |
template< typename Key, typename T, typename Predicate > qsizetype | erase_if (QHash< Key, T > &hash, Predicate pred) |
size_t | qHash (QPoint key, size_t seed=0) |
size_t | qHash (const QTypeRevision &key, size_t seed) |
size_t | qHash (const QVersionNumber &key, size_t seed) |
size_t | qHash (const QOcspResponse &response, size_t seed) noexcept |
Returns the hash value for the response, using seed to seed the calculation. | |
size_t | qHash (const QSslCertificate &key, size_t seed) noexcept |
Returns the hash value for the key, using seed to seed the calculation. | |
size_t | qHash (QSslEllipticCurve curve, size_t seed=0) |
size_t | qHash (const QSslError &key, size_t seed) noexcept |
Returns the hash value for the key, using seed to seed the calculation. | |
size_t | qHash (const QGeoCoordinate &coordinate, size_t seed=0) |
Returns a hash value for coordinate, using seed to seed the calculation. | |
\inmodule QtCore
The QHash class is a template class that provides a hash-table-based dictionary.
\reentrant
QHash<Key, T> is one of Qt's generic \l{container classes}. It stores (key, value) pairs and provides very fast lookup of the value associated with a key.
QHash provides very similar functionality to QMap. The differences are:
\list
Here's an example QHash with QString keys and int
values:
To insert a (key, value) pair into the hash, you can use operator[]():
This inserts the following three (key, value) pairs into the QHash: ("one", 1), ("three", 3), and ("seven", 7). Another way to insert items into the hash is to use insert():
To look up a value, use operator[]() or value():
If there is no item with the specified key in the hash, these functions return a \l{default-constructed value}.
If you want to check whether the hash contains a particular key, use contains():
There is also a value() overload that uses its second argument as a default value if there is no item with the specified key:
In general, we recommend that you use contains() and value() rather than operator[]() for looking up a key in a hash. The reason is that operator[]() silently inserts an item into the hash if no item exists with the same key (unless the hash is const). For example, the following code snippet will create 1000 items in memory:
To avoid this problem, replace hash
[i] with hash.value(i)
in the code above.
Internally, QHash uses a hash table to perform lookups. This hash table automatically grows to provide fast lookups without wasting too much memory. You can still control the size of the hash table by calling reserve() if you already know approximately how many items the QHash will contain, but this isn't necessary to obtain good performance. You can also call capacity() to retrieve the hash table's size.
QHash will not shrink automatically if items are removed from the table. To minimize the memory used by the hash, call squeeze().
If you want to navigate through all the (key, value) pairs stored in a QHash, you can use an iterator. QHash provides both \l{Java-style iterators} (QHashIterator and QMutableHashIterator) and \l{STL-style iterators} (QHash::const_iterator and QHash::iterator). Here's how to iterate over a QHash<QString, int> using a Java-style iterator:
Here's the same code, but using an STL-style iterator:
QHash is unordered, so an iterator's sequence cannot be assumed to be predictable. If ordering by key is required, use a QMap.
A QHash allows only one value per key. If you call insert() with a key that already exists in the QHash, the previous value is erased. For example:
If you need to store multiple entries for the same key in the hash table, use \l{QMultiHash}.
If you only need to extract the values from a hash (not the keys), you can also use range-based for:
Items can be removed from the hash in several ways. One way is to call remove(); this will remove any item with the given key. Another way is to use QMutableHashIterator::remove(). In addition, you can clear the entire hash using clear().
QHash's key and value data types must be \l{assignable data types}. You cannot, for example, store a QWidget as a value; instead, store a QWidget *.
\target qHash
\inmodule QtCore
The QHash::const_key_value_iterator typedef provides an STL-style const iterator for QHash.
QHash::const_key_value_iterator is essentially the same as QHash::const_iterator with the difference that operator*() returns a key/value pair instead of a value.
Qt-style synonym for QHash::const_iterator.
Qt-style synonym for QHash::iterator.
\inmodule QtCore
The QHash::key_value_iterator typedef provides an STL-style iterator for QHash.
QHash::key_value_iterator is essentially the same as QHash::iterator with the difference that operator*() returns a key/value pair instead of a value.
using QHash< Key, T >::reference = T & |
|
inlinedefaultnoexcept |
Constructs an empty hash.
|
inline |
Constructs a hash with a copy of each of the elements in the initializer list list.
Definition at line 839 of file qhash.h.
References QList< T >::begin(), QHash< Key, T >::const_iterator, QList< T >::end(), QHash< Key, T >::insert(), it, and list.
|
inlinenoexcept |
Constructs a copy of other.
This operation occurs in \l{constant time}, because QHash is \l{implicitly shared}. This makes returning a QHash from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and this takes \l{linear time}.
Definition at line 845 of file qhash.h.
References d.
|
inline |
Constructs a hash with a copy of each of the elements in the iterator range [begin, end). Either the elements iterated by the range must be objects with {first} and
{second} data members (like
{std::pair}), convertible to
Key
and to T
respectively; or the iterators must have {key()} and
{value()} member functions, returning a key convertible to
Key
and a value convertible to T
respectively.
Definition at line 883 of file qhash.h.
References QHash< Key, T >::insert(), and QtPrivate::reserveIfForwardIterator().
|
inline |
Definition at line 892 of file qhash.h.
References QHash< Key, T >::insert(), and QtPrivate::reserveIfForwardIterator().
Definition at line 1228 of file qhash.h.
References QtPrivate::QKeyValueRange().
Referenced by QNetworkRequestFactoryPrivate::newRequest().
Definition at line 1230 of file qhash.h.
References QtPrivate::QKeyValueRange().
Definition at line 1229 of file qhash.h.
References QtPrivate::QKeyValueRange().
Definition at line 1231 of file qhash.h.
References QtPrivate::QKeyValueRange().
|
inline |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1212 of file qhash.h.
References d, QHash< Key, T >::detach(), and QHash< Key, T >::iterator.
Referenced by QQuickDesignerSupport::~QQuickDesignerSupport(), QQuickSmoothedAnimationPrivate::~QQuickSmoothedAnimationPrivate(), QQuickTimeLine::~QQuickTimeLine(), QWindowsDirectWriteFontDatabase::~QWindowsDirectWriteFontDatabase(), QAbstractTextDocumentLayoutPrivate::_q_handlerDestroyed(), QParallelAnimationGroupPrivate::_q_uncontrolledAnimationFinished(), QFseventsFileSystemWatcherEngine::addPaths(), QQuickTimeLinePrivate::advance(), QSet< T >::begin(), QV4::MultiplyWrappedQObjectMap::begin(), QSet< T >::begin(), QV4DebuggerAgent::breakPointIds(), QGraphicsScenePrivate::cancelGesturesForChildren(), QSet< T >::cbegin(), QWaylandTextureSharingExtension::cleanupBuffers(), QSSGRhiContextPrivate::cleanupDrawCallData(), QQmlTypeLoader::clearCache(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QHash< Key, T >::constKeyValueBegin(), QD3D11Buffer::destroy(), QGraphicsScenePrivate::gestureEventHandler(), QHttp2Connection::handleConnectionClosure(), QSGRhiAtlasTexture::Manager::invalidate(), QSGDefaultRenderContext::invalidateGlyphCaches(), QSimplexConstraint::invert(), QHash< Key, T >::keyBegin(), QHash< Key, T >::keys(), QHash< Key, T >::keyValueBegin(), QHash< Key, T >::keyValueBegin(), QWindowsCursor::pixmapWindowCursor(), QSvgIconEngine::read(), readDependencies(), QGraphicsScenePrivate::removeItemHelper(), QAndroidPlatformMenuBar::removeMenu(), QAndroidPlatformMenu::removeMenuItem(), QQuickWorkerScriptEngine::run(), QPollingFileSystemWatcherEngine::timerEvent(), QSocks5BindStore::timerEvent(), QQmlTypeLoader::trimCache(), QQuickSpringAnimationPrivate::updateMode(), QQuickItemViewPrivate::updateUnrequestedIndexes(), VDMAbstractItemModelDataType::value(), and QHash< Key, T >::values().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
qhash-iterator-invalidation-func-desc
Definition at line 1213 of file qhash.h.
References QHash< Key, T >::const_iterator, and d.
|
inlinenoexcept |
Returns the number of buckets in the QHash's internal hash table.
The sole purpose of this function is to provide a means of fine tuning QHash's memory usage. In general, you will rarely ever need to call this function. If you want to know how many items are in the hash, call size().
Definition at line 930 of file qhash.h.
References d.
Referenced by QSet< T >::capacity(), QHash< Key, T >::reserve(), and QHash< Key, T >::squeeze().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1214 of file qhash.h.
References QHash< Key, T >::const_iterator, and d.
Referenced by QGestureManager::~QGestureManager(), QItemEditorFactory::~QItemEditorFactory(), QRhiImplementation::~QRhiImplementation(), QSmoothedAnimation::~QSmoothedAnimation(), QSpringAnimation::~QSpringAnimation(), QtFreetypeData::~QtFreetypeData(), QQuickTimeLine::clear(), QWindowsContext::findPlatformWindow(), QHttp2Connection::handleReadyRead(), QItemEditorFactory::registerEditor(), QQmlJSCodeGenerator::run(), QRhi::runCleanup(), QQuickItemViewPrivate::updateUnrequestedPositions(), and QSvgIconEngine::write().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1218 of file qhash.h.
References QHash< Key, T >::const_iterator.
Referenced by QGestureManager::~QGestureManager(), QItemEditorFactory::~QItemEditorFactory(), QRhiImplementation::~QRhiImplementation(), QSmoothedAnimation::~QSmoothedAnimation(), QSpringAnimation::~QSpringAnimation(), QtFreetypeData::~QtFreetypeData(), QNetworkReplyHttpImplPrivate::_q_metaDataChanged(), QWidgetAnimator::abort(), Graph< Vertex, EdgeData >::adjacentVertices(), QCommandLineParserPrivate::aliases(), QSSGRhiShaderPipeline::bindingForTexture(), QQuickTimeLine::clear(), QSGRhiAtlasTexture::Manager::create(), Graph< Vertex, EdgeData >::edgeData(), QQuickWorkerScriptEnginePrivate::event(), QWindowsContext::findPlatformWindow(), QSSGLayerRenderData::getBonemapTexture(), QSSGShaderLibraryManager::getIncludeContents(), QSSGLayerRenderData::getLightmapTexture(), QSSGShaderLibraryManager::getShaderMetaData(), QSSGShaderLibraryManager::getShaderSource(), QFontEngine::glyphCache(), QAndroidActivityResultReceiverPrivate::handleActivityResult(), QHttp2Connection::handleReadyRead(), QNetworkReplyImplPrivate::metaDataChanged(), QPMCache::object(), QSSGRhiShaderPipeline::offsetOfUniform(), QSGMaterialShaderPrivate::prepare(), QItemEditorFactory::registerEditor(), QAbstractItemViewPrivate::removeEditor(), QQmlComponentPrivate::removePropertyFromRequired(), QQuickWorkerScriptEngine::removeWorkerScript(), QSocks5BindStore::retrieve(), QQmlJSCodeGenerator::run(), QRhi::runCleanup(), QSSGRhiShaderPipeline::setUniform(), QSSGRhiShaderPipeline::setUniformArray(), QQmlOpenMetaObject::setValue(), QQmlDMAbstractItemModelData::setValue(), QSSGShaderCache::tryGetRhiShaderPipeline(), QGestureManager::unregisterGestureRecognizer(), QQuickItemViewPrivate::updateUnrequestedPositions(), QQmlOpenMetaObject::value(), QQmlOpenMetaObject::valueRef(), QCommandLineParser::values(), and QSvgIconEngine::write().
|
inlinenoexcept |
Removes all items from the hash and frees up all memory used by it.
Definition at line 951 of file qhash.h.
References d.
Referenced by LinuxDmabufClientBufferIntegration::~LinuxDmabufClientBufferIntegration(), QOpenGLContextVersionData::~QOpenGLContextVersionData(), QQmlMetaTypeData::~QQmlMetaTypeData(), QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate(), QQuickPixmapReader::~QQuickPixmapReader(), QtFreetypeData::~QtFreetypeData(), QOpenGLContextGroupPrivate::cleanup(), QMimeAllGlobPatterns::clear(), QMimeTypeXMLData::clear(), QSet< T >::clear(), QFontCache::clear(), QNetworkAccessCache::clear(), QHeaderViewPrivate::clear(), QQuickParticleDataHeap::clear(), QQuickTimeLine::clear(), QNetworkRequestFactory::clearAttributes(), QQmlTypeLoader::clearCache(), QQmlJSImporter::clearCache(), QHeaderViewPrivate::clearCascadingSections(), QRelation::clearDictionary(), QFont::clearFeatures(), QNetworkHeadersPrivate::clearHeaders(), QRhiGles2::compileShader(), QD3D11Buffer::destroy(), QRhiGles2::destroy(), QRhiMetal::destroy(), QParallelAnimationGroupPrivate::disconnectUncontrolledAnimations(), QLowEnergyControllerPrivateBluezDBus::discoverServiceDetails(), QQmlTypeData::done(), QMimeXMLProvider::ensureLoaded(), QNetworkReplyHttpImplPrivate::followRedirect(), QGraphicsScenePrivate::gestureEventHandler(), QQmlJSTypeResolver::init(), QSGRhiAtlasTexture::Manager::invalidate(), QCoreTextFontDatabase::invalidate(), QSGSoftwareRenderContext::invalidate(), QSGDefaultRenderContext::invalidate(), QSGDefaultRenderContext::invalidateGlyphCaches(), QGeoTiledMappingManagerEngineNokia::loadCopyrightsDescriptorsFromJson(), QPpdPrintDevice::loadPageSizes(), QCocoaPrintDevice::loadPageSizes(), QCommandLineParserPrivate::parse(), QCoreTextFontDatabase::populateFontDatabase(), QSvgIconEngine::read(), QSSGShaderCache::releaseCachedResources(), QSSGRhiContextPrivate::releaseCachedResources(), QSSGCustomMaterialSystem::releaseCachedResources(), QRhiGles2::releaseCachedResources(), QRhiMetal::releaseCachedResources(), QSGBatchRenderer::Renderer::releaseCachedResources(), QQuickTableViewPrivate::releaseLoadedItems(), QCFSocketNotifier::removeSocketNotifiers(), QBackingStoreRhiSupport::reset(), QGles2CommandBuffer::ComputePassState::reset(), QCocoaTheme::reset(), QFontLoaderFonts::reset(), QSGRhiShaderLinker::reset(), QSSGLayerRenderData::resetForFrame(), QDBusConnectionManager::run(), QQuickWorkerScriptEngine::run(), QRhi::runCleanup(), QQuickImageParticle::sceneGraphInvalidated(), QHeaderViewPrivate::sectionsChanged(), QNetworkHeadersPrivate::setAllRawHeaders(), QQmlJSImporter::setImportPaths(), QIconLoader::setThemeSearchPath(), QQmlSettingsPrivate::store(), QWindowsMouseHandler::translateTouchEvent(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickImageParticle::updatePaintNode(), and QQuickAnimatorController::windowNodesDestroyed().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1215 of file qhash.h.
References QHash< Key, T >::const_iterator, and d.
Referenced by QCocoaCursor::~QCocoaCursor(), QQuickWanderAffector::~QQuickWanderAffector(), QMimeXMLProvider::addAllMimeTypes(), QGraphicsScenePrivate::addView(), QQuickTimeLinePrivate::advance(), QV4::MultiplyWrappedQObjectMap::begin(), QMetaStringTable::blobSize(), buildAndroidProject(), QOpenGLContextGroupPrivate::cleanup(), QQmlTypeCompiler::compile(), QSet< T >::constBegin(), QParallelAnimationGroupPrivate::disconnectUncontrolledAnimations(), QMacPrintEnginePrivate::initialize(), VDMAbstractItemModelDataType::initializeConstructor(), QSGDefaultRenderContext::invalidate(), QSimplexConstraint::isSatisfied(), QQmlJSCodeGenerator::lookupVariable(), main(), QAndroidPlatformMenuBar::menuId(), QAndroidPlatformMenu::menuId(), QFont::operator<(), readInputFile(), readInputFileDirectory(), QGeoTiledMappingManagerEngine::releaseMap(), ThreadedTestHTTPServer::run(), QXcbConnection::startSystemMoveResizeForTouch(), QQmlSettingsPrivate::store(), QSGDistanceFieldGlyphNode::updateGeometry(), updateLibsXml(), QSGRhiShaderEffectMaterial::updateTextureProviders(), QMetaStringTable::writeBlob(), QQmlToolingSettings::writeDefaults(), and LinuxDmabuf::zwp_linux_dmabuf_v1_bind_resource().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1219 of file qhash.h.
References QHash< Key, T >::const_iterator.
Referenced by QCocoaCursor::~QCocoaCursor(), QQuickWanderAffector::~QQuickWanderAffector(), QMimeXMLProvider::addAllMimeTypes(), QGraphicsScenePrivate::addView(), QQuickTimeLinePrivate::advance(), QWidgetAnimator::animate(), QMetaStringTable::blobSize(), buildAndroidProject(), QOpenGLContextGroupPrivate::cleanup(), QQmlTypeCompiler::compile(), QRhiGles2::compileShader(), QSSGRhiContextPrivate::computePipeline(), QSet< T >::constEnd(), QParallelAnimationGroupPrivate::disconnectUncontrolledAnimations(), QQmlOpenMetaObject::emitPropertyNotification(), QV4::MultiplyWrappedQObjectMap::end(), QHash< Key, T >::erase(), QQmlMetaTypeData::findPropertyCacheInCompositeTypes(), QQmlDebugServerImpl::hasEngine(), QWindowsCursor::hCursor(), QMacPrintEnginePrivate::initialize(), VDMAbstractItemModelDataType::initializeConstructor(), QQmlTypeLoader::injectedScript(), QSGDefaultRenderContext::invalidate(), QSimplexConstraint::isSatisfied(), QQmlPreviewFileLoader::load(), Cache::lookup(), QQmlJSCodeGenerator::lookupVariable(), main(), QAndroidPlatformMenuBar::menuId(), QAndroidPlatformMenu::menuId(), QDesktopServices::openUrl(), QFont::operator<(), QCommandLineParserPrivate::parse(), QCommandLineParserPrivate::parseOptionValue(), QSSGRhiContextPrivate::pipeline(), QQuickShaderEffectPrivate::propertyChanged(), readInputFile(), readInputFileDirectory(), QQmlMetaTypeData::registerModuleTypes(), QQmlJSCodeGenerator::registerVariable(), QGeoTiledMappingManagerEngine::releaseMap(), QXcbEventQueue::removePeekerId(), QQmlProfilerClientPrivate::resolveType(), QtWaylandClient::QWaylandMimeData::retrieveData_sys(), ThreadedTestHTTPServer::run(), QSSGRhiShaderPipeline::setUniform(), QSSGRhiShaderPipeline::setUniformArray(), QSSGRhiContextPrivate::srb(), QQmlJSCodeGenerator::startInstruction(), QXcbConnection::startSystemMoveResizeForTouch(), QQmlSettingsPrivate::store(), QBackingStoreRhiSupport::swapChainForWindow(), QSGDistanceFieldGlyphNode::updateGeometry(), updateLibsXml(), QSGRhiShaderEffectMaterial::updateTextureProviders(), QMetaStringTable::writeBlob(), QQmlToolingSettings::writeDefaults(), and LinuxDmabuf::zwp_linux_dmabuf_v1_bind_resource().
|
inlinenoexcept |
Returns an iterator pointing to the item with the key in the hash.
If the hash contains no item with the key, the function returns constEnd().
qhash-iterator-invalidation-func-desc
Definition at line 1299 of file qhash.h.
References QHash< Key, T >::find().
Referenced by QSmoothedAnimation::~QSmoothedAnimation(), QSpringAnimation::~QSpringAnimation(), QNetworkReplyHttpImplPrivate::_q_metaDataChanged(), QWidgetAnimator::abort(), Graph< Vertex, EdgeData >::adjacentVertices(), QCommandLineParserPrivate::aliases(), QWidgetAnimator::animate(), QSSGRhiShaderPipeline::bindingForTexture(), QRhiGles2::compileShader(), QSSGRhiContextPrivate::computePipeline(), Graph< Vertex, EdgeData >::edgeData(), QQmlOpenMetaObject::emitPropertyNotification(), QQuickWorkerScriptEnginePrivate::event(), QQmlMetaType::findCompositeType(), QQmlMetaTypeData::findPropertyCacheInCompositeTypes(), QSSGLayerRenderData::getBonemapTexture(), QSSGShaderLibraryManager::getIncludeContents(), QSSGLayerRenderData::getLightmapTexture(), QSSGShaderLibraryManager::getShaderMetaData(), QSSGShaderLibraryManager::getShaderSource(), QFontEngine::glyphCache(), QQmlDebugServerImpl::hasEngine(), QWindowsCursor::hCursor(), QQmlTypeLoader::injectedScript(), QQmlPreviewFileLoader::load(), Cache::lookup(), QNetworkReplyImplPrivate::metaDataChanged(), QQmlMetaType::obtainCompilationUnit(), QSSGRhiShaderPipeline::offsetOfUniform(), QDesktopServices::openUrl(), QCommandLineParserPrivate::parse(), QCommandLineParserPrivate::parseOptionValue(), QSSGRhiContextPrivate::pipeline(), QSGMaterialShaderPrivate::prepare(), QQuickShaderEffectPrivate::propertyChanged(), QItemEditorFactory::registerEditor(), QQmlMetaTypeData::registerModuleTypes(), QQmlJSCodeGenerator::registerVariable(), QAbstractItemViewPrivate::removeEditor(), QXcbEventQueue::removePeekerId(), QQmlComponentPrivate::removePropertyFromRequired(), QQuickWorkerScriptEngine::removeWorkerScript(), QQmlProfilerClientPrivate::resolveType(), QSocks5BindStore::retrieve(), QtWaylandClient::QWaylandMimeData::retrieveData_sys(), QSSGRhiShaderPipeline::setUniform(), QSSGRhiShaderPipeline::setUniformArray(), QQmlOpenMetaObject::setValue(), QQmlDMAbstractItemModelData::setValue(), QQmlOpenMetaObject::setValues(), QSSGRhiContextPrivate::srb(), QQmlJSCodeGenerator::startInstruction(), QBackingStoreRhiSupport::swapChainForWindow(), QOpenXRView::touchpointState(), QSSGShaderCache::tryGetRhiShaderPipeline(), QGestureManager::unregisterGestureRecognizer(), QQmlOpenMetaObject::value(), QQmlOpenMetaObject::valueRef(), and QCommandLineParser::values().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1225 of file qhash.h.
References QHash< Key, T >::begin().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary entry after the last entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1227 of file qhash.h.
References QHash< Key, T >::end().
|
inlinenoexcept |
Returns true
if the hash contains an item with the key; otherwise returns false
.
Definition at line 1007 of file qhash.h.
References d.
Referenced by QSocks5BindStore::add(), QQmlDebugServerImpl::addEngine(), QSvgTinyDocument::addNamedStyle(), QCommandLineParser::addOption(), QFseventsFileSystemWatcherEngine::addPaths(), QQmlDebugServerImpl::addService(), QGeoTiledMapScenePrivate::addTile(), QGeoPositionInfo::attribute(), QGeoSatelliteInfo::attribute(), QHeaderViewPrivate::cascadingResize(), QHaikuCursor::changeCursor(), Moc::checkSuperClasses(), QNetworkRequestFactory::clearAttribute(), QSet< T >::contains(), QSocks5BindStore::contains(), QColorOutputPrivate::containsColor(), QHash< Key, T >::count(), QQuickPath::createPath(), CustomDataProxy::data(), QGraphicsItem::data(), QQmlJSAnnotation::deprecation(), QLowEnergyControllerPrivateBluezDBus::discoverServiceDetails(), QQmlTableInstanceModel::dispose(), QSvgFont::draw(), QGestureManager::filterEvent(), QGraphicsScenePrivate::gestureEventHandler(), goodToCopy(), QSGSoftwareRenderLoop::grab(), QDialogButtonBoxPrivate::handleButtonShowAndHide(), QGeoPositionInfo::hasAttribute(), QGeoSatelliteInfo::hasAttribute(), QAbstractItemViewPrivate::hasEditor(), QNetworkAccessCache::hasEntry(), LinuxDmabufClientBufferIntegration::importBuffer(), QDeclarativeSupportedCategoriesModel::index(), QQuickParticleDataHeap::insertTimed(), BluetoothManagement::isAddressRandom(), QQuickPixmap::isCached(), QFont::isFeatureSet(), QQmlTypeLoader::isScriptLoaded(), QQmlToolingSettings::isSet(), QQmlTypeLoader::isTypeLoaded(), QWaylandIviApplicationPrivate::ivi_application_surface_create(), QMimeXMLProvider::knowsMimeType(), QSGRhiShaderLinker::linkTextureSubRects(), QQuickTableViewPrivate::loadedTableItem(), QCocoaPrintDevice::macPaper(), Moc::parseClassHead(), QSGCurveGlyphAtlas::populate(), QSGOpenVGFontGlyphCache::populate(), QWindowsDirectWriteFontDatabase::populateFamilyAliases(), QPpdPrintDevice::printableMargins(), QCocoaPrintDevice::printableMargins(), QQuickShaderEffectPrivate::propertyChanged(), readInputFile(), readInputFileDirectory(), QQuickDesignerSupport::refFromEffectItem(), QCommandLineParserPrivate::registerFoundOption(), QCtfLibImpl::registerMetadata(), QQuickParticleSystem::registerParticleGroupData(), QWaylandXdgOutputManagerV1Private::registerXdgOutput(), QQmlTableInstanceModel::release(), QQmlDebugServerImpl::removeEngine(), QQmlWatcher::removeWatch(), QHeaderViewPrivate::saveCascadingSectionSize(), QQmlToolingSettings::search(), QQuickTableViewPrivate::selectionRectangle(), QHttp2ProtocolHandler::sendRequest(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), QQuickTableViewPrivate::setCurrentOnDelegateItem(), QQuickTableViewPrivate::setSelectedOnDelegateItem(), QV4::ExecutionEngine::stopTimer(), Preprocessor::substituteUntilNewline(), QtWaylandClient::QWaylandTextInputMethod::text_input_method_v1_end_input_method_event(), QtWaylandClient::QWaylandTextInputMethod::text_input_method_v1_input_method_event_attribute(), QtWaylandClient::QWaylandTextInputMethod::text_input_method_v1_start_input_method_event(), QWindowsMouseHandler::translateTouchEvent(), Driver::unique(), QQuickTableViewPrivate::unloadItem(), QSGSoftwareRenderableNodeUpdater::updateNodes(), QQmlJSImportVisitor::visit(), QTextOdfWriter::writeAll(), QTextOdfWriter::writeFrame(), QTextOdfWriter::writeTableCellFormat(), and QWaylandXdgOutputManagerV1Private::zxdg_output_manager_v1_get_xdg_output().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as size().
Definition at line 1290 of file qhash.h.
References d.
|
inlinenoexcept |
Returns the number of items associated with the key.
Definition at line 1013 of file qhash.h.
References QHash< Key, T >::contains().
|
inline |
Detaches this hash from any other hashes with which it may share data.
Definition at line 947 of file qhash.h.
References d, and QHashPrivate::Data< Node >::detached().
Referenced by QHash< Key, T >::begin(), QSet< T >::detach(), QHash< Key, T >::emplace(), QHash< Key, T >::erase(), and QHash< Key, T >::insert().
|
inline |
Definition at line 1324 of file qhash.h.
References args, copy(), QHash< Key, T >::emplace(), and Key.
Referenced by QHash< Key, T >::emplace(), QHash< Key, T >::insert(), QHash< Key, T >::insert(), QSet< T >::insert(), and QTest::TestRegistry::registerTest().
|
inline |
Inserts a new element into the container.
This new element is constructed in-place using args as the arguments for its construction.
Returns an iterator pointing to the new element.
qhash-iterator-invalidation-func-desc
Definition at line 1331 of file qhash.h.
References args, copy(), d, QHash< Key, T >::detach(), and QHash< Key, T >::isDetached().
|
inlinenoexcept |
This function is provided for STL compatibility.
It is equivalent to isEmpty(), returning true if the hash is empty; otherwise returns false
.
Definition at line 1349 of file qhash.h.
References QHash< Key, T >::isEmpty().
Referenced by QQmlIncubatorPrivate::incubate(), and QQuickStackElement::initialize().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
qhash-iterator-invalidation-func-desc
Definition at line 1217 of file qhash.h.
References QHash< Key, T >::const_iterator.
|
inlinenoexcept |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last item in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1216 of file qhash.h.
References QHash< Key, T >::iterator.
Referenced by QQuickDesignerSupport::~QQuickDesignerSupport(), QQuickSmoothedAnimationPrivate::~QQuickSmoothedAnimationPrivate(), QQuickTimeLine::~QQuickTimeLine(), QWindowsDirectWriteFontDatabase::~QWindowsDirectWriteFontDatabase(), QAbstractTextDocumentLayoutPrivate::_q_handlerDestroyed(), QParallelAnimationGroupPrivate::_q_uncontrolledAnimationFinished(), QQuickTimeLinePrivate::add(), QFseventsFileSystemWatcherEngine::addPaths(), QQuickTimeLinePrivate::advance(), QV4DebuggerAgent::breakPointIds(), QGeoTiledMapScenePrivate::buildGeometry(), QGraphicsScenePrivate::cancelGesturesForChildren(), QSet< T >::cend(), QXcbCursor::changeCursor(), QWaylandTextureSharingExtension::cleanupBuffers(), QSSGRhiContextPrivate::cleanupDrawCallData(), QQmlTypeLoader::clearCache(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QHash< Key, T >::constKeyValueEnd(), LinuxDmabufClientBufferIntegration::createBufferFor(), QD3D11Buffer::destroy(), QAndroidStyle::drawComplexControl(), QAndroidStyle::drawControl(), QAndroidStyle::drawPrimitive(), QAbstractItemViewPrivate::editorForIndex(), QSet< T >::end(), QV4::MultiplyWrappedQObjectMap::end(), QSet< T >::end(), QMetaStringTable::enter(), QGraphicsScenePrivate::gestureEventHandler(), QTest::TestRegistry::getTestEntryFunction(), QHttp2Connection::handleConnectionClosure(), QAndroidStyle::hitTestComplexControl(), QAbstractItemViewPrivate::indexForEditor(), QCtfLibImpl::initializeTracepoint(), QSGRhiAtlasTexture::Manager::invalidate(), QSGDefaultRenderContext::invalidateGlyphCaches(), QSimplexConstraint::invert(), QHash< Key, T >::keyEnd(), QHash< Key, T >::keys(), QHash< Key, T >::keyValueEnd(), QHash< Key, T >::keyValueEnd(), QQuickPixmap::load(), QQuickPixmap::loadImageFromDevice(), QEventDispatcherUNIXPrivate::markPendingSocketNotifiers(), VDMAbstractItemModelDataType::notify(), QHash< Key, T >::operator==(), QXcbEventQueue::peekEventQueue(), QWindowsCursor::pixmapWindowCursor(), QWindowsDirectWriteFontDatabase::populateFamily(), QFseventsFileSystemWatcherEngine::processEvent(), QSvgIconEngine::read(), readDependencies(), Graph< Vertex, EdgeData >::removeDirectedEdge(), QGraphicsScenePrivate::removeItemHelper(), QAndroidPlatformMenuBar::removeMenu(), QAndroidPlatformMenu::removeMenuItem(), QFseventsFileSystemWatcherEngine::removePaths(), QWindowsContext::removeWindow(), Preprocessor::resolveInclude(), QQuickWorkerScriptEngine::run(), QSSGShaderLibraryManager::setShaderSource(), QQmlTableModelColumn::setterAtRole(), QSSGCustomMaterialSystem::shadersForCustomMaterial(), QAndroidStyle::sizeFromContents(), QWindowsCursor::standardWindowCursor(), QAndroidStyle::subControlRect(), QAndroidStyle::subElementRect(), QQuickTimeLine::sync(), QQuickTimeLine::sync(), QPollingFileSystemWatcherEngine::timerEvent(), QSocks5BindStore::timerEvent(), QQmlTypeLoader::trimCache(), QD3D11Buffer::unorderedAccessView(), QQuickSpringAnimationPrivate::updateMode(), QQuickItemViewPrivate::updateUnrequestedIndexes(), VDMAbstractItemModelDataType::value(), QHash< Key, T >::values(), and QQuickWorkerScriptEnginePrivate::workerEngine().
|
inlinenoexcept |
|
inline |
Removes the (key, value) pair associated with the iterator pos from the hash, and returns an iterator to the next item in the hash.
This function never causes QHash to rehash its internal data structure. This means that it can safely be called while iterating, and won't affect the order of items in the hash. For example:
qhash-iterator-invalidation-func-desc
Definition at line 1233 of file qhash.h.
References QHash< Key, T >::constEnd(), d, QHash< Key, T >::detach(), i, QHashPrivate::Data< Node >::Bucket::isUnused(), it, Q_ASSERT, and QHashPrivate::Data< Node >::Bucket::toBucketIndex().
Referenced by QSmoothedAnimation::~QSmoothedAnimation(), QSpringAnimation::~QSpringAnimation(), QAbstractTextDocumentLayoutPrivate::_q_handlerDestroyed(), QWidgetAnimator::abort(), QQuickTimeLinePrivate::advance(), QWaylandTextureSharingExtension::cleanupBuffers(), QSSGRhiContextPrivate::cleanupDrawCallData(), QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QSet< T >::erase(), QV4::MultiplyWrappedQObjectMap::erase(), QQuickWorkerScriptEnginePrivate::event(), QSGDefaultRenderContext::invalidateGlyphCaches(), QWindowsCursor::pixmapWindowCursor(), QSGMaterialShaderPrivate::prepare(), QQuickShaderEffectPrivate::propertyChanged(), readDependencies(), QItemEditorFactory::registerEditor(), Graph< Vertex, EdgeData >::removeDirectedEdge(), QAbstractItemViewPrivate::removeEditor(), QGraphicsScenePrivate::removeItemHelper(), QAndroidPlatformMenuBar::removeMenu(), QAndroidPlatformMenu::removeMenuItem(), QFseventsFileSystemWatcherEngine::removePaths(), QXcbEventQueue::removePeekerId(), QQmlComponentPrivate::removePropertyFromRequired(), QWindowsContext::removeWindow(), QSocks5BindStore::retrieve(), QPollingFileSystemWatcherEngine::timerEvent(), QSocks5BindStore::timerEvent(), QQmlTypeLoader::trimCache(), and QGestureManager::unregisterGestureRecognizer().
|
inline |
Returns an iterator pointing to the item with the key in the hash.
If the hash contains no item with the key, the function returns end().
If the hash contains multiple items with the key, this function returns an iterator that points to the most recently inserted value. The other values are accessible by incrementing the iterator. For example, here's some code that iterates over all the items with the same key:
qhash-iterator-invalidation-func-desc
Definition at line 1291 of file qhash.h.
Referenced by QQuickTimeLinePrivate::add(), QFseventsFileSystemWatcherEngine::addPaths(), QGeoTiledMapScenePrivate::buildGeometry(), QXcbCursor::changeCursor(), QHash< Key, T >::constFind(), QSGRhiAtlasTexture::Manager::create(), LinuxDmabufClientBufferIntegration::createBufferFor(), QAndroidStyle::drawComplexControl(), QAndroidStyle::drawControl(), QAndroidStyle::drawPrimitive(), QAbstractItemViewPrivate::editorForIndex(), QMetaStringTable::enter(), QSet< T >::find(), QSet< T >::find(), QTest::TestRegistry::getTestEntryFunction(), QAndroidStyle::hitTestComplexControl(), QAbstractItemViewPrivate::indexForEditor(), QCtfLibImpl::initializeTracepoint(), QQuickPixmap::load(), QQuickPixmap::loadImageFromDevice(), QEventDispatcherUNIXPrivate::markPendingSocketNotifiers(), VDMAbstractItemModelDataType::notify(), QPMCache::object(), QHash< Key, T >::operator==(), QXcbEventQueue::peekEventQueue(), QWindowsCursor::pixmapWindowCursor(), QWindowsDirectWriteFontDatabase::populateFamily(), QFseventsFileSystemWatcherEngine::processEvent(), Graph< Vertex, EdgeData >::removeDirectedEdge(), QFseventsFileSystemWatcherEngine::removePaths(), QWindowsContext::removeWindow(), Preprocessor::resolveInclude(), QSSGShaderLibraryManager::setShaderSource(), QQmlTableModelColumn::setterAtRole(), QSSGCustomMaterialSystem::shadersForCustomMaterial(), QAndroidStyle::sizeFromContents(), QWindowsCursor::standardWindowCursor(), QAndroidStyle::subControlRect(), QAndroidStyle::subElementRect(), QQuickTimeLine::sync(), QQuickTimeLine::sync(), QD3D11Buffer::unorderedAccessView(), VDMAbstractItemModelDataType::value(), and QQuickWorkerScriptEnginePrivate::workerEngine().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
qhash-iterator-invalidation-func-desc
|
inline |
Inserts a new item with the key and a value of value.
If there is already an item with the key, that item's value is replaced with value.
Returns an iterator pointing to the new/updated element.
qhash-iterator-invalidation-func-desc
Definition at line 1303 of file qhash.h.
References QHash< Key, T >::emplace().
Referenced by DarwinBluetooth::AdvertisementData::AdvertisementData(), LinuxDmabufClientBufferIntegration::LinuxDmabufClientBufferIntegration(), QDBusConnectionPrivate::QDBusConnectionPrivate(), QHaikuCursor::QHaikuCursor(), QHash< Key, T >::QHash(), QHash< Key, T >::QHash(), QNetworkReplyPrivate::QNetworkReplyPrivate(), QQuick3DParticleSpriteParticle::QQuick3DParticleSpriteParticle(), Python::WriteImports::WriteImports(), QQmlSettingsPrivate::_q_propertyChanged(), QSocks5BindStore::add(), QQuickTimeLinePrivate::add(), QMimeXMLProvider::addAlias(), TestHTTPServer::addAlias(), QV4DebuggerAgent::addBreakPoint(), QPdfEnginePrivate::addConstantAlphaObject(), QAbstractItemViewPrivate::addEditor(), QNetworkAccessCache::addEntry(), QSvgIconEngine::addFile(), QSvgFont::addGlyph(), QPdfEnginePrivate::addImage(), QMimeXMLProvider::addMimeType(), QSvgTinyDocument::addNamedNode(), QSvgTinyDocument::addNamedStyle(), QSGAbstractSoftwareRenderer::addNodeMapping(), QCommandLineParser::addOption(), QFseventsFileSystemWatcherEngine::addPaths(), QInotifyFileSystemWatcherEngine::addPaths(), QKqueueFileSystemWatcherEngine::addPaths(), QSvgIconEngine::addPixmap(), TestHTTPServer::addRedirect(), QQmlDebugServerImpl::addService(), QSvgTinyDocument::addSvgFont(), QGeoTiledMapScenePrivate::addTile(), AttachedPropertyTypeValidatorPass::addWarning(), QWindowsContext::addWindow(), QDirectFbInput::addWindow(), QQmlInspectorServiceImpl::addWindow(), QXcbConnection::addWindowEventListener(), QQuickAnimatorController::beforeNodeSync(), QXcbCursor::changeCursor(), QHaikuCursor::changeCursor(), QQmlTypeCompiler::compile(), QSSGShaderCache::compileForRhi(), QRhiGles2::compileShader(), QSSGRhiContextPrivate::computePipeline(), QV4::ExecutionEngine::consoleCountHelper(), QGraphicsAnchorLayoutPrivate::constraintsFromSizeHints(), QSGRhiAtlasTexture::Manager::create(), QDialogButtonBoxPrivate::createButton(), QWasmIntegration::createPlatformBackingStore(), QQmlOpenMetaObjectType::createProperties(), QQmlOpenMetaObjectType::createProperty(), createSlack(), QSGDefaultRenderContext::curveGlyphAtlas(), QLowEnergyControllerPrivateBluezDBus::discoverServices(), QCtfLibImpl::doTracepoint(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QGraphicsScenePrivate::drawSubtreeRecursive(), QPdfEnginePrivate::drawTextItem(), QMetaStringTable::enter(), QSGRhiShaderLinker::feedSamplers(), QNetworkReplyHttpImplPrivate::fetchCacheMetaData(), QXcbEventQueue::generatePeekerId(), QGraphicsScenePrivate::gestureEventHandler(), QSSGShaderLibraryManager::getIncludeContents(), QQmlTypeLoader::getQmldir(), QQmlTypeLoader::getScript(), QSSGAssetImportManager::getSupportedExtensions(), QQmlTypeLoader::getType(), QDialogButtonBoxPrivate::handleButtonShowAndHide(), QQmlJSImporter::importQmldirs(), QLowEnergyControllerPrivateBluez::init(), QNetworkReplyHttpImplPrivate::initCacheSaveDevice(), QNetworkReplyImplPrivate::initCacheSaveDevice(), QPlaceManagerEngineNokiaV2::initializeCategories(), VDMAbstractItemModelDataType::initializeMetaType(), QCtfLibImpl::initializeTracepoint(), QQmlTypeLoader::injectScript(), QSet< T >::insert(), QSGOpenVGFontGlyphCacheManager::insertCache(), QColorOutputPrivate::insertColor(), QAndroidPlatformMenuBar::insertMenu(), QDBusPlatformMenu::insertMenuItem(), QAndroidPlatformMenu::insertMenuItem(), QQuickParticleDataHeap::insertTimed(), QWaylandIviApplicationPrivate::ivi_application_surface_create(), QDefaultOutputMapping::load(), QPpdPrintDevice::loadPageSizes(), QCocoaPrintDevice::loadPageSizes(), QCocoaPrintDevice::macPaper(), QSSGShaderCache::newPipelineFromPregenerated(), QWinRTLowEnergyServiceHandler::obtainCharList(), Moc::parse(), Moc::parseClassHead(), QSSGRhiContextPrivate::pipeline(), QWindowsCursor::pixmapWindowCursor(), QSGCurveGlyphAtlas::populate(), QWindowsDirectWriteFontDatabase::populateFontDatabase(), QQuickTableViewPrivate::processLoadRequest(), QQmlMetaTypeData::propertyCache(), QQuickShaderEffectPrivate::propertyChanged(), QSvgIconEngine::read(), readAndroidDependencyXml(), readInputFile(), SharedTextureRegistry::receiveBuffer(), QNetworkReplyImplPrivate::redirectionRequested(), QQuickDesignerSupport::refFromEffectItem(), QCtfLibImpl::registerMetadata(), QQuickParticleSystem::registerParticleGroupData(), QCFSocketNotifier::registerSocketNotifier(), QQuickWorkerScriptEngine::registerWorkerScript(), QQuickItemViewPrivate::releaseItem(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QGeoAreaMonitorPollingPrivate::requestUpdate(), Preprocessor::resolveInclude(), QtWaylandClient::QWaylandMimeData::retrieveData_sys(), QQmlListModel::roleNames(), QQmlXmlListModel::roleNames(), QDeclarativeGeocodeModel::roleNames(), QDeclarativeGeoRouteModel::roleNames(), QDeclarativeSearchSuggestionModel::roleNames(), QQmlJSCodeGenerator::run(), QHeaderViewPrivate::saveCascadingSectionSize(), QNetworkRequest::setAttribute(), QNetworkRequestFactory::setAttribute(), QmlLsp::QQmlCodeModel::setBuildPathsForRootUrl(), QSimplex::setConstraints(), QCocoaWindow::setContentBorderAreaEnabled(), QNetworkHeadersPrivate::setCookedHeader(), QFontPrivate::setFeature(), QAuthenticator::setOption(), QSSGShaderLibraryManager::setShaderSource(), QDesktopServices::setUrlHandler(), QSSGCustomMaterialSystem::shadersForCustomMaterial(), QGraphicsAnchorLayoutPrivate::solveMinMax(), QGraphicsAnchorLayoutPrivate::solvePreferred(), QSSGRhiContextPrivate::srb(), QWindowsCursor::standardWindowCursor(), QGeoAreaMonitorPollingPrivate::startMonitoring(), QBackingStoreRhiSupport::swapChainForWindow(), QSGRenderContext::textureForFactory(), QGeoTileRequestManagerPrivate::tileError(), QWindowsMouseHandler::translateTouchEvent(), QSSGShaderCache::tryNewPipelineFromPersistentCache(), Driver::unique(), QGestureManager::unregisterGestureRecognizer(), QQuick3DSceneManager::updateDirtyResource(), QQuick3DSceneManager::updateDirtyResourceSecondPass(), QQuick3DSceneManager::updateDirtySpatialNode(), QmlLsp::QQmlCodeModel::url2Path(), QQmlJSImportVisitor::visit(), QTextOdfWriter::writeAll(), QWaylandTextInputPrivate::zwp_text_input_v2_enable(), QWaylandTextInputV3Private::zwp_text_input_v3_bind_resource(), and QWaylandTextInputV3Private::zwp_text_input_v3_enable().
|
inline |
Inserts all the items in the other hash into this hash.
If a key is common to both hashes, its value will be replaced with the value stored in other.
Definition at line 1308 of file qhash.h.
References d, QHash< Key, T >::detach(), QHash< Key, T >::emplace(), hash, and it.
|
inlinenoexcept |
Returns true
if the hash's internal data isn't shared with any other hash object; otherwise returns false
.
Definition at line 948 of file qhash.h.
References d.
Referenced by QHash< Key, T >::emplace(), QSet< T >::isDetached(), and QHash< Key, T >::reserve().
|
inlinenoexcept |
Returns true
if the hash contains no items; otherwise returns false.
Definition at line 928 of file qhash.h.
References d.
Referenced by QSGRhiAtlasTexture::Manager::~Manager(), QRhiImplementation::~QRhiImplementation(), QHeaderViewPrivate::adjustedVisualIndex(), QWidgetAnimator::animating(), QQuickTableViewPrivate::checkForVisibilityChanges(), QGeoAreaMonitorPollingPrivate::checkStartStop(), QNetworkRequestFactory::clearAttributes(), QFont::clearFeatures(), QAbstractItemViewPrivate::editorForIndex(), QHash< Key, T >::empty(), QAbstractItemViewPrivate::hasEditor(), QQmlIncubatorPrivate::incubateCppBasedComponent(), QAbstractItemViewPrivate::indexForEditor(), PlaceManagerEngineEsri::initializeCategories(), QPlaceManagerEngineMapbox::initializeCategories(), QPlaceManagerEngineOsm::initializeCategories(), QSGSoftwareRenderContext::invalidate(), QQuickTimeLine::isActive(), QSet< T >::isEmpty(), QQuickTableViewPrivate::loadAndUnloadVisibleEdges(), QQuickTableViewPrivate::loadInitialTable(), QFileSystemModelPrivate::name(), QCocoaTheme::palette(), QQuickTableViewPrivate::processRebuildTable(), readDependencies(), QLibInputTouch::registerDevice(), QKqueueFileSystemWatcherEngine::removePaths(), QXcbEventQueue::removePeekerId(), QQmlSettingsPrivate::reset(), QSocks5BindStore::retrieve(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QHeaderViewPrivate::sectionsHiddenToBitVector(), QHeaderViewPrivate::setDefaultSectionSize(), QQuickTableViewPrivate::setSelectionEndPos(), QQuickTableViewPrivate::setSelectionStartPos(), QQuickTableViewPrivate::syncRebuildOptions(), QQuickTableViewPrivate::syncSyncView(), QQuickTableViewPrivate::tableLayoutToString(), QQuickTableViewPrivate::updateContentHeight(), QQuickTableViewPrivate::updateContentWidth(), QQuickTimeLine::updateCurrentTime(), QSGDistanceFieldGlyphNode::updateGeometry(), updateLibsXml(), QQuickTableViewPrivate::updateTable(), and QSvgIconEngine::virtual_hook().
|
inlinenoexcept |
Definition at line 1034 of file qhash.h.
References Key.
Referenced by QQmlTableModel::data(), QQuickParticleGroupData::name(), and QQmlTableModel::setData().
|
inlinenoexcept |
Returns the first key mapped to value. If the hash contains no item mapped to value, returns defaultKey, or a \l{default-constructed value}{default-constructed key} if this parameter has not been supplied.
This function can be slow (\l{linear time}), because QHash's internal data structure is optimized for fast lookup by key, not by value.
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first key in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1220 of file qhash.h.
References QHash< Key, T >::begin().
Referenced by QHash< Key, T >::keys(), QQuickImageParticle::prepareNextFrame(), QV4DebuggerAgent::removeAllBreakPoints(), and QQuickTableViewPrivate::updateSelectedOnAllDelegateItems().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last key in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1221 of file qhash.h.
References QHash< Key, T >::end().
Referenced by QHash< Key, T >::keys(), QQuickImageParticle::prepareNextFrame(), QV4DebuggerAgent::removeAllBreakPoints(), and QQuickTableViewPrivate::updateSelectedOnAllDelegateItems().
|
inline |
Returns a list containing all the keys in the hash, in an arbitrary order.
The order is guaranteed to be the same as that used by values().
This function creates a new list, in \l {linear time}. The time and memory use that entails can be avoided by iterating from \l keyBegin() to \l keyEnd().
Definition at line 1086 of file qhash.h.
References QHash< Key, T >::keyBegin(), and QHash< Key, T >::keyEnd().
Referenced by QQmlDebugConnectionPrivate::advertisePlugins(), QDialogButtonBoxPrivate::allButtons(), QmlLsp::QQmlCodeModel::buildPathsForFileUrl(), QPlaceManagerEngineMapbox::childCategoryIds(), QDeclarativeSupportedCategoriesModel::data(), QFont::featureTags(), QGraphicsScenePrivate::gestureEventHandler(), QTest::TestRegistry::getAllTestNames(), QDeclarativeSupportedCategoriesModel::index(), QDeclarativeSupportedCategoriesModel::parent(), QCoreTextFontDatabase::populateFontDatabase(), readInputFile(), readInputFileDirectory(), and QDeclarativeSupportedCategoriesModel::rowCount().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list containing all the keys associated with value value, in an arbitrary order.
This function can be slow (\l{linear time}), because QHash's internal data structure is optimized for fast lookup by key, not by value.
Definition at line 1087 of file qhash.h.
References QHash< Key, T >::begin(), QHash< Key, T >::end(), and i.
|
inline |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1222 of file qhash.h.
References QHash< Key, T >::begin().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1224 of file qhash.h.
References QHash< Key, T >::begin().
|
inline |
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary entry after the last entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1223 of file qhash.h.
References QHash< Key, T >::end().
|
inlinenoexcept |
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary entry after the last entry in the hash.
qhash-iterator-invalidation-func-desc
Definition at line 1226 of file qhash.h.
References QHash< Key, T >::end().
|
inlinenoexcept |
Returns the current load factor of the QHash's internal hash table.
This is the same as capacity()/size(). The implementation used will aim to keep the load factor between 0.25 and 0.5. This avoids having too many hash table collisions that would degrade performance.
Even with a low load factor, the implementation of the hash table has a very low memory overhead.
This method purely exists for diagnostic purposes and you should rarely need to call it yourself.
Definition at line 1344 of file qhash.h.
References d.
|
inlinestaticnoexcept |
Definition at line 1347 of file qhash.h.
References QHashPrivate::Data< Node >::maxNumBuckets().
|
inlinenoexcept |
Returns true
if other is not equal to this hash; otherwise returns false
.
Two hashes are considered equal if they contain the same (key, value) pairs.
This function requires the value type to implement operator==()
.
Definition at line 920 of file qhash.h.
References other().
|
inlinenoexcept |
Returns true
if other is equal to this hash; otherwise returns false.
Two hashes are considered equal if they contain the same (key, value) pairs.
This function requires the value type to implement operator==()
.
Definition at line 904 of file qhash.h.
References d, QHash< Key, T >::end(), QHash< Key, T >::find(), i, it, and other().
|
inline |
Returns the value associated with the key as a modifiable reference.
If the hash contains no item with the key, the function inserts a \l{default-constructed value} into the hash with the key, and returns a reference to it.
! [qhash-iterator-invalidation-func-desc]
\sa insert(), value()
Definition at line 1064 of file qhash.h.
Referenced by QV4::MultiplyWrappedQObjectMap::insert().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as value().
|
inline |
Removes the item that has the key from the hash.
Returns true if the key exists in the hash and the item has been removed, and false otherwise.
Definition at line 958 of file qhash.h.
Referenced by SharedTextureRegistry::abandonBuffer(), QQuickAnimatorController::animationFinished(), QParallelAnimationGroupPrivate::animationRemoved(), QtWaylandClient::QWaylandMimeData::appendFormat(), QQuickAnimatorController::beforeNodeSync(), QQmlTableInstanceModel::cancel(), QGraphicsScenePrivate::cancelGesturesForChildren(), QHeaderViewPrivate::cascadingResize(), QGestureManager::cleanupCachedGestures(), QQuick3DSceneManager::cleanupNodes(), QNetworkRequestFactory::clearAttribute(), QFontEngine::clearGlyphCache(), QQuickItemViewPrivate::createItem(), QQmlTableInstanceModel::dispose(), QGestureManager::filterEventThroughContexts(), QGraphicsScenePrivate::gestureEventHandler(), QQuickStackLayout::itemChange(), QQmlTableInstanceModel::object(), QQuickParticleDataHeap::pop(), QQmlTableInstanceModel::release(), QQuickTransformAnimatorHelperStore::release(), QPMCache::releaseKey(), QGeoTiledMappingManagerEngine::releaseMap(), QSet< T >::remove(), QGeoPositionInfo::removeAttribute(), QGeoSatelliteInfo::removeAttribute(), QWasmIntegration::removeBackingStore(), QV4DebuggerAgent::removeBreakPoint(), LinuxDmabufClientBufferIntegration::removeBuffer(), QDialogButtonBoxPrivate::removeButton(), QAbstractItemViewPrivate::removeEditor(), QQmlDebugServerImpl::removeEngine(), QNetworkAccessCache::removeEntry(), QQuickPixmapData::removeFromCache(), QGraphicsScenePrivate::removeItemHelper(), QDBusPlatformMenu::removeMenuItem(), QQmlDebugServerImpl::removeService(), QGeoTiledMapScenePrivate::removeTiles(), QDirectFbInput::removeWindow(), QQmlInspectorServiceImpl::removeWindow(), QXcbConnection::removeWindowEventListener(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QGeoTileRequestManagerPrivate::requestTiles(), QGraphicsAnchorLayoutPrivate::restoreSimplifiedConstraints(), QWindowsFileSystemWatcherEngineThread::run(), QNetworkRequest::setAttribute(), QmlLsp::QQmlCodeModel::setBuildPathsForRootUrl(), QNetworkHeadersPrivate::setCookedHeader(), QGraphicsWidgetStyles::setStyleForWidget(), QDesktopServices::setUrlHandler(), QGeoAreaMonitorPollingPrivate::startMonitoring(), QtWaylandClient::QWaylandTextInputMethod::text_input_method_v1_end_input_method_event(), QGeoTileRequestManagerPrivate::tileError(), QGeoTileRequestManagerPrivate::tileFetched(), QNetworkAccessCache::timerEvent(), QWindowsMouseHandler::translateTouchEvent(), QWaylandIviApplicationPrivate::unregisterIviSurface(), QCFSocketNotifier::unregisterSocketNotifier(), QWaylandXdgOutputManagerV1Private::unregisterXdgOutput(), QFontPrivate::unsetFeature(), QSGSoftwareRenderableNodeUpdater::updateNodes(), QmlLsp::QQmlCodeModel::url2Path(), QQmlJSImportVisitor::visit(), QSGSoftwareRenderLoop::windowDestroyed(), and QWaylandTextInputV3Private::zwp_text_input_v3_destroy_resource().
|
inline |
Removes all elements for which the predicate pred returns true from the hash.
The function supports predicates which take either an argument of type {QHash<Key, T>::iterator}, or an argument of type
{std::pair<const Key &, T &>}.
Returns the number of elements removed, if any.
Definition at line 980 of file qhash.h.
References QtPrivate::associative_erase_if().
|
inline |
Ensures that the QHash's internal hash table has space to store at least size items without having to grow the hash table.
This implies that the hash table will contain at least 2 * size buckets to ensure good performance
This function is useful for code that needs to build a huge hash and wants to avoid repeated reallocation. For example:
Ideally, size should be the maximum number of items expected in the hash. QHash will then choose the smallest possible number of buckets that will allow storing size items in the table without having to grow the internal hash table. If size is an underestimate, the worst that will happen is that the QHash will be a bit slower.
In general, you will rarely ever need to call this function. QHash's internal hash table automatically grows to provide good performance without wasting too much memory.
Definition at line 931 of file qhash.h.
References QHash< Key, T >::capacity(), d, QHashPrivate::Data< Node >::detached(), and QHash< Key, T >::isDetached().
Referenced by QSGRhiShaderLinker::reset(), QHash< Key, T >::squeeze(), and QCborMap::toVariantHash().
|
inlinenoexcept |
Returns the number of items in the hash.
Definition at line 927 of file qhash.h.
References d.
Referenced by QRhiImplementation::~QRhiImplementation(), QQmlDebugServerImpl::addEngine(), QQuickAnimatorController::beforeNodeSync(), QMetaStringTable::blobSize(), QRhiGles2::compileShader(), copyQtFiles(), QSet< T >::count(), QQmlOpenMetaObject::count(), QCtfLibImpl::doTracepoint(), QQmlTypeLoader::getType(), QAndroidActivityResultReceiverPrivate::globalRequestCode(), QFont::operator<(), QWindowsCursor::pixmapWindowCursor(), QQmlOpenMetaObjectType::propertyCount(), readAndroidDependencyXml(), QQuickStackLayout::rearrange(), QQmlDebugServerImpl::removeEngine(), QQuickPixmapData::removeFromCache(), QFontLoaderFonts::reset(), QQmlJSCodeGenerator::run(), QSet< T >::size(), QQuickTableViewPrivate::tableLayoutToString(), QTest::TestRegistry::total(), QWindowsMouseHandler::translateTouchEvent(), QSGDistanceFieldGlyphNode::updateGeometry(), VDMAbstractItemModelDataType::value(), QQmlJSImportVisitor::visit(), and QMetaStringTable::writeBlob().
|
inline |
Reduces the size of the QHash's internal hash table to save memory.
The sole purpose of this function is to provide a means of fine tuning QHash's memory usage. In general, you will rarely ever need to call this function.
Definition at line 941 of file qhash.h.
References QHash< Key, T >::capacity(), and QHash< Key, T >::reserve().
Referenced by QSet< T >::squeeze().
|
inlinenoexcept |
Swaps hash other with this hash. This operation is very fast and never fails.
Definition at line 900 of file qhash.h.
References d, other(), and qt_ptr_swap().
Referenced by QQmlMetaTypeData::~QQmlMetaTypeData(), QQmlMetaType::clearTypeRegistrations(), and QSet< T >::swap().
|
inline |
Removes the item with the key from the hash and returns the value associated with it.
If the item does not exist in the hash, the function simply returns a \l{default-constructed value}.
If you don't use the return value, remove() is more efficient.
Definition at line 985 of file qhash.h.
Referenced by QAbstractItemViewPrivate::columnsAboutToBeRemoved(), QQuickDesignerSupport::derefFromEffectItem(), QDialogButtonBoxPrivate::handleButtonShowAndHide(), QSSGRhiContextPrivate::releaseDrawCallData(), QPMCache::remove(), QInotifyFileSystemWatcherEngine::removePaths(), QKqueueFileSystemWatcherEngine::removePaths(), QQmlWatcher::removeWatch(), QGeoAreaMonitorPollingPrivate::stopMonitoring(), QV4::ExecutionEngine::stopTimer(), QWaylandQtTextInputMethodPrivate::text_input_method_v1_disable(), QtWaylandClient::QWaylandTextInputMethod::text_input_method_v1_end_input_method_event(), QSGRenderContext::textureFactoryDestroyed(), QQuickTableViewPrivate::unloadItem(), QWaylandTextInputPrivate::zwp_text_input_v2_disable(), and QWaylandTextInputV3Private::zwp_text_input_v3_disable().
|
inlinenoexcept |
Definition at line 1054 of file qhash.h.
Referenced by QMenuPrivate::_q_actionTriggered(), QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead(), QNetworkReplyImplPrivate::_q_copyReadyRead(), QMenuPrivate::_q_platformMenuAboutToShow(), CPP::WriteInitialization::acceptWidget(), QQuickTransformAnimatorHelperStore::acquire(), QSvgIconEngine::actualSize(), QPdfEnginePrivate::addConstantAlphaObject(), QNetworkAccessCache::addEntry(), QPdfEnginePrivate::addImage(), QMimeXMLProvider::addParents(), QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions(), QCocoaWindow::applyContentBorderThickness(), QNetworkRequest::attribute(), QNetworkRequestFactory::attribute(), QNetworkRequestFactory::attribute(), QQuickPath::attributeAt(), SharedTextureRegistry::bufferForId(), QmlLsp::QQmlCodeModel::buildPathsForRootUrl(), QSGOpenVGFontGlyphCacheManager::cache(), QQmlTableInstanceModel::cancel(), QGraphicsScenePrivate::cancelGesturesForChildren(), QHeaderViewPrivate::cascadingResize(), PlaceManagerEngineEsri::category(), QPlaceManagerEngineMapbox::category(), QPlaceManagerEngineOsm::category(), QHaikuCursor::changeCursor(), QQmlJSCodeGenerator::changedRegisterVariable(), PlaceManagerEngineEsri::childCategories(), QPlaceManagerEngineOsm::childCategories(), PlaceManagerEngineEsri::childCategoryIds(), QPlaceManagerEngineOsm::childCategoryIds(), QFontCache::clear(), QColorOutputPrivate::color(), QV4::ExecutionEngine::consoleCountHelper(), LinuxDmabufClientBufferIntegration::createBufferFor(), QItemEditorFactory::createEditor(), QQuickPath::createPath(), QWasmIntegration::createPlatformWindow(), QSGDefaultRenderContext::curveGlyphAtlas(), QDeclarativeSupportedCategoriesModel::data(), CustomDataProxy::data(), QQmlTableModel::data(), QGraphicsItem::data(), QAuthenticatorPrivate::digestMd5Response(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QMacStyle::drawControl(), QPdfEnginePrivate::drawTextItem(), QFont::featureValue(), QSGRhiShaderLinker::feedSamplers(), QWindowsContext::findClosestPlatformWindow(), QWindowsContext::findPlatformWindow(), QNetworkReplyHttpImplPrivate::finished(), QNetworkReplyImplPrivate::finished(), QMimeXMLProvider::genericIcon(), QGraphicsScenePrivate::gestureEventHandler(), QQmlTypeLoader::getQmldir(), QQmlTypeLoader::getScript(), QHttp2Connection::getStream(), QQmlTypeLoader::getType(), QMimeXMLProvider::globPatterns(), QOffscreenBackingStore::grabWindow(), QMimeXMLProvider::hasGlobDeleteAll(), QNetworkRequest::header(), QNetworkProxy::header(), QMimeXMLProvider::icon(), QQmlEnginePrivate::imageProvider(), QQmlTableInstanceModel::incubationStatus(), QDeclarativeSupportedCategoriesModel::index(), QParallelAnimationGroupPrivate::isUncontrolledAnimationFinished(), QSGRhiShaderLinker::linkTextureSubRects(), QQuickTableViewPrivate::loadedTableItem(), QMimeXMLProvider::localeComments(), QCocoaPrintDevice::macPaper(), QGraphicsScenePrivate::markDirty(), QMimeAllGlobPatterns::matchingGlobs(), QAndroidPlatformMenuBar::menuForId(), QDBusMenuBar::menuForTag(), QAndroidPlatformMenu::menuItemForId(), QFileSystemModelPrivate::name(), QSvgTinyDocument::namedNode(), QSvgTinyDocument::namedStyle(), QQmlMetaType::obtainCompilationUnit(), QQmlNativeDebugConnector::open(), QAuthenticator::option(), QFontFamilyDelegate::paint(), QCocoaTheme::palette(), PlaceManagerEngineEsri::parentCategoryId(), QAuthenticatorPrivate::parseDigestAuthenticationChallenge(), QAuthenticatorPrivate::parseHttpResponse(), QSvgIconEngine::pixmap(), QXcbConnection::platformWindowFromId(), QCoreTextFontDatabase::populateFontDatabase(), QPpdPrintDevice::printableMargins(), QCocoaPrintDevice::printableMargins(), QQmlMetaTypeData::propertyCache(), qt_aqua_get_known_size(), QQuickParticleEmitter::reclaculateGroupId(), QGestureManager::recycle(), QCFSocketNotifier::registerSocketNotifier(), QNetworkAccessCache::releaseEntry(), QV4DebuggerAgent::removeBreakPoint(), QNetworkAccessCache::removeEntry(), QFseventsFileSystemWatcherEngine::removePaths(), QQmlDebugServerImpl::removeService(), QSGAbstractSoftwareRenderer::renderableNode(), QQuickDesignerSupport::renderImageForItem(), QNetworkReplyHttpImplPrivate::replyDownloadData(), QNetworkAccessCache::requestEntryNow(), QMimeXMLProvider::resolveAlias(), QV4::CompiledData::CompilationUnit::resolvedType(), QQmlTypeCompiler::resolvedType(), SignalHandlerResolver::resolveSignalHandlerExpressions(), QDeclarativeSupportedCategoriesModel::rowCount(), QDefaultOutputMapping::screenNameForDeviceNode(), QMenuPrivate::scrollMenu(), QHeaderViewPrivate::sectionsAboutToBeChanged(), QGtk3FileDialogHelper::selectedNameFilter(), QGtk3FileDialogHelper::selectNameFilter(), QNetworkReplyHttpImplPrivate::sendCacheContents(), QEventDispatcherWin32Private::sendTimerEvent(), QQmlDebugServerImpl::service(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), QQmlTableModel::setData(), QQmlTableInstanceModel::setRequiredProperty(), VDMListDelegateDataType::setValue(), QQmlJSCodeGenerator::startInstruction(), QSGRhiDistanceFieldGlyphCache::storeGlyphs(), QGraphicsWidgetStyles::styleForWidget(), QMacStyle::subControlRect(), QSGRenderContext::textureForFactory(), QGeoTileRequestManagerPrivate::tileError(), QDBusConnectionPrivate::timerEvent(), QWindowsMouseHandler::translateTouchEvent(), QSvgIconEnginePrivate::tryLoad(), QSGRenderContext::unregisterFontengineForCleanup(), QCFSocketNotifier::unregisterSocketNotifier(), QFontCache::updateHitCountAndTimeStamp(), QGraphicsItemPrivate::updatePaintedViewBoundingRects(), QmlLsp::QQmlCodeModel::url2Path(), QQmlToolingSettings::value(), QItemEditorFactory::valuePropertyName(), QCommandLineParser::values(), QQnxIntegration::window(), QXcbConnection::windowEventListenerFromId(), QSvgIconEngine::write(), QTextOdfWriter::writeAll(), QTextOdfWriter::writeTableCellFormat(), and QXcbCursor::xcbCursor().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the value associated with the key.
If the hash contains no item with the key, the function returns defaultValue, or a \l{default-constructed value} if this parameter has not been supplied.
|
inline |
Returns a list containing all the values in the hash, in an arbitrary order.
The order is guaranteed to be the same as that used by keys().
This function creates a new list, in \l {linear time}. The time and memory use that entails can be avoided by iterating from \l keyValueBegin() to \l keyValueEnd().
Definition at line 1098 of file qhash.h.
References QHash< Key, T >::begin(), and QHash< Key, T >::end().
Referenced by QGeoAreaMonitorPolling::activeMonitors(), QPlaceManagerEngineMapbox::childCategories(), and QQuickTableViewPrivate::dumpTable().
|
friend |
Definition at line 1182 of file qhash.h.
Referenced by QHash< Key, T >::QHash(), QHash< Key, T >::begin(), QHash< Key, T >::cbegin(), QHash< Key, T >::cend(), QHash< Key, T >::constBegin(), QHash< Key, T >::constEnd(), QHash< Key, T >::end(), and QOpenXRView::touchpointState().
|
related |
Removes all elements for which the predicate pred returns true from the hash hash.
The function supports predicates which take either an argument of type {QHash<Key, T>::iterator}, or an argument of type
{std::pair<const Key &, T &>}.
Returns the number of elements removed, if any.
Definition at line 2459 of file qhash.h.
References QtPrivate::associative_erase_if(), and hash.
|
friend |
Definition at line 1142 of file qhash.h.
Referenced by QHash< Key, T >::begin(), and QHash< Key, T >::end().
|
related |
Writes the hash hash to stream out.
This function requires the key and value types to implement operator<<()
.
Definition at line 565 of file qdatastream.h.
References hash, and QtPrivate::readAssociativeContainer().
|
related |
Reads a hash from stream in into hash.
This function requires the key and value types to implement operator>>()
.
Definition at line 565 of file qdatastream.h.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 101 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 170 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 172 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 198 of file qhashfunctions.h.
References qHash(), qToByteArrayViewIgnoringNull(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 191 of file qhashfunctions.h.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 6252 of file qdatetime.cpp.
|
related |
Returns a hash value for coordinate, using seed to seed the calculation.
Definition at line 746 of file qgeocoordinate.cpp.
References QGeoCoordinate::altitude, hash, QGeoCoordinate::latitude, QGeoCoordinate::longitude, and seed.
|
related |
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 966 of file qsslcertificate.cpp.
References seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 339 of file qsslerror.cpp.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 204 of file qhashfunctions.h.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 212 of file qtyperevision.cpp.
Returns the hash value for the url.
If specified, seed is used to initialize the hash.
Definition at line 3685 of file qurl.cpp.
References QUrlPrivate::fragment, QUrlPrivate::host, QUrlPrivate::password, QUrlPrivate::path, QUrlPrivate::port, qHash(), QUrlPrivate::query, QUrlPrivate::scheme, seed, url, and QUrlPrivate::userName.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 580 of file qversionnumber.cpp.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Types T1
and T2
must be supported by qHash().
Definition at line 365 of file qhashfunctions.h.
References qHashMulti(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 178 of file qhashfunctions.h.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 1625 of file qhash.cpp.
References QHashPrivate::hash(), murmurhash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 158 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 113 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 1643 of file qhash.cpp.
References QHashPrivate::hash(), murmurhash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 117 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 6267 of file qdatetime.cpp.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 125 of file qhashfunctions.h.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 1139 of file qhash.cpp.
References qCpuHasFeature, qHashBits_fallback< ByteToWord >(), qt_qhash_seed, and seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 455 of file qpoint.cpp.
References qHashMulti(), and seed.
|
related |
Returns an hash value for the curve curve, using seed to seed the calculation.
Definition at line 53 of file qsslellipticcurve.h.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 6278 of file qdatetime.cpp.
Returns the hash value for the key, using seed to seed the calculation.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 119 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 109 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 105 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 182 of file qhashfunctions.h.
References seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 103 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 111 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 115 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 107 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the key, using seed to seed the calculation.
Definition at line 168 of file qhashfunctions.h.
References QHashPrivate::hash(), and seed.
|
related |
Returns the hash value for the memory block of size len pointed to by p, using seed to seed the calculation.
Use this function only to implement qHash() for your own custom types. For example, here's how you could implement a qHash() overload for std::vector<int>:
This takes advantage of the fact that std::vector lays out its data contiguously. If that is not the case, or the contained type has padding, you should use qHashRange() instead.
It bears repeating that the implementation of qHashBits() - like the qHash() overloads offered by Qt - may change at any time. You {must not} rely on the fact that qHashBits() will give the same results (for the same inputs) across different Qt versions.
Definition at line 1089 of file qhash.cpp.
References qCpuHasFeature, qt_qhash_seed, and seed.
|
related |
This method is being used by QHash to compare two keys. Returns true if the keys a and b are considered equal for hashing purposes.
The default implementation returns the result of (a == b). It can be reimplemented for a certain type if the equality operator is not suitable for hashing purposes. This is for example the case if the equality operator uses qFuzzyCompare to compare floating point values.
Definition at line 256 of file qhashfunctions.h.
|
related |
Returns the hash value for the {args}, using seed to seed the calculation, by successively applying qHash() to each element and combining the hash values into a single one.
Note that the order of the arguments is significant. If order does not matter, use qHashMultiCommutative() instead. If you are hashing raw memory, use qHashBits(); if you are hashing a range, use qHashRange().
This function is provided as a convenience to implement qHash() for your own custom types. For example, here's how you could implement a qHash() overload for a class {Employee}:
Definition at line 322 of file qhashfunctions.h.
|
related |
Returns the hash value for the {args}, using seed to seed the calculation, by successively applying qHash() to each element and combining the hash values into a single one.
The order of the arguments is insignificant. If order does matter, use qHashMulti() instead, as it may produce better quality hashing. If you are hashing raw memory, use qHashBits(); if you are hashing a range, use qHashRange().
This function is provided as a convenience to implement qHash() for your own custom types.
Definition at line 336 of file qhashfunctions.h.
|
related |
Returns the hash value for the range [{first},{last}), using seed to seed the calculation, by successively applying qHash() to each element and combining the hash values into a single one.
The return value of this function depends on the order of elements in the range. That means that
and
hash to {different} values. If order does not matter, for example for hash tables, use qHashRangeCommutative() instead. If you are hashing raw memory, use qHashBits().
Use this function only to implement qHash() for your own custom types. For example, here's how you could implement a qHash() overload for std::vector<int>:
It bears repeating that the implementation of qHashRange() - like the qHash() overloads offered by Qt - may change at any time. You {must not} rely on the fact that qHashRange() will give the same results (for the same inputs) across different Qt versions, even if qHash() for the element type would.
Definition at line 344 of file qhashfunctions.h.
References seed.
|
related |
Returns the hash value for the range [{first},{last}), using seed to seed the calculation, by successively applying qHash() to each element and combining the hash values into a single one.
The return value of this function does not depend on the order of elements in the range. That means that
and
hash to the {same} values. If order matters, for example, for vectors and arrays, use qHashRange() instead. If you are hashing raw memory, use qHashBits().
Use this function only to implement qHash() for your own custom types. For example, here's how you could implement a qHash() overload for std::unordered_set<int>:
It bears repeating that the implementation of qHashRangeCommutative() - like the qHash() overloads offered by Qt
Definition at line 351 of file qhashfunctions.h.
References seed.
|
friend |