diff options
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 2b029a583c..9bad4c833c 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -166,9 +166,9 @@ QQmlPropertyCache::Ptr QQmlPropertyCache::copy(const QQmlMetaObjectPointer &mo, QQmlPropertyCache::Ptr cache = QQmlPropertyCache::Ptr( new QQmlPropertyCache(mo), QQmlPropertyCache::Ptr::Adopt); cache->_parent.reset(this); - cache->propertyIndexCacheStart = propertyIndexCache.count() + propertyIndexCacheStart; - cache->methodIndexCacheStart = methodIndexCache.count() + methodIndexCacheStart; - cache->signalHandlerIndexCacheStart = signalHandlerIndexCache.count() + signalHandlerIndexCacheStart; + cache->propertyIndexCacheStart = propertyIndexCache.size() + propertyIndexCacheStart; + cache->methodIndexCacheStart = methodIndexCache.size() + methodIndexCacheStart; + cache->signalHandlerIndexCacheStart = signalHandlerIndexCache.size() + signalHandlerIndexCacheStart; cache->stringCache.linkAndReserve(stringCache, reserve); cache->allowedRevisionCache = allowedRevisionCache; cache->_defaultPropertyName = _defaultPropertyName; @@ -214,7 +214,7 @@ void QQmlPropertyCache::appendProperty(const QString &name, QQmlPropertyData::Fl if (overrideResult == InvalidOverride) return; - int index = propertyIndexCache.count(); + int index = propertyIndexCache.size(); propertyIndexCache.append(data); setNamedProperty(name, index + propertyOffset(), propertyIndexCache.data() + index, @@ -246,10 +246,10 @@ void QQmlPropertyCache::appendSignal(const QString &name, QQmlPropertyData::Flag if (overrideResult == InvalidOverride) return; - int methodIndex = methodIndexCache.count(); + int methodIndex = methodIndexCache.size(); methodIndexCache.append(data); - int signalHandlerIndex = signalHandlerIndexCache.count(); + int signalHandlerIndex = signalHandlerIndexCache.size(); signalHandlerIndexCache.append(handler); QString handlerName = QLatin1String("on") + name; @@ -283,7 +283,7 @@ void QQmlPropertyCache::appendMethod(const QString &name, QQmlPropertyData::Flag new (args->types + ii + 1) QMetaType(parameterTypes.at(ii)); data.setArguments(args); - int methodIndex = methodIndexCache.count(); + int methodIndex = methodIndexCache.size(); methodIndexCache.append(data); setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, @@ -435,8 +435,8 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, data->load(m); - Q_ASSERT((allowedRevisionCache.count() - 1) < Q_INT16_MAX); - data->setMetaObjectOffset(allowedRevisionCache.count() - 1); + Q_ASSERT((allowedRevisionCache.size() - 1) < Q_INT16_MAX); + data->setMetaObjectOffset(allowedRevisionCache.size() - 1); if (data->isSignal()) { sigdata = &signalHandlerIndexCache[signalHandlerIndex - signalHandlerIndexCacheStart]; @@ -516,8 +516,8 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, data->load(p); data->setTypeVersion(typeVersion); - Q_ASSERT((allowedRevisionCache.count() - 1) < Q_INT16_MAX); - data->setMetaObjectOffset(allowedRevisionCache.count() - 1); + Q_ASSERT((allowedRevisionCache.size() - 1) < Q_INT16_MAX); + data->setMetaObjectOffset(allowedRevisionCache.size() - 1); QQmlPropertyData *old = nullptr; @@ -591,9 +591,9 @@ void QQmlPropertyCache::invalidate(const QMetaObject *metaObject) int reserve = pc + mc + sc; if (parent()) { - propertyIndexCacheStart = parent()->propertyIndexCache.count() + parent()->propertyIndexCacheStart; - methodIndexCacheStart = parent()->methodIndexCache.count() + parent()->methodIndexCacheStart; - signalHandlerIndexCacheStart = parent()->signalHandlerIndexCache.count() + parent()->signalHandlerIndexCacheStart; + propertyIndexCacheStart = parent()->propertyIndexCache.size() + parent()->propertyIndexCacheStart; + methodIndexCacheStart = parent()->methodIndexCache.size() + parent()->methodIndexCacheStart; + signalHandlerIndexCacheStart = parent()->signalHandlerIndexCache.size() + parent()->signalHandlerIndexCacheStart; stringCache.linkAndReserve(parent()->stringCache, reserve); append(metaObject, QTypeRevision()); } else { @@ -980,8 +980,8 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const for (StringCache::ConstIterator iter = stringCache.begin(), cend = stringCache.end(); iter != cend; ++iter) Insert::in(this, properties, methods, iter, iter.value().second); - Q_ASSERT(properties.size() == propertyIndexCache.count()); - Q_ASSERT(methods.size() == methodIndexCache.count()); + Q_ASSERT(properties.size() == propertyIndexCache.size()); + Q_ASSERT(methods.size() == methodIndexCache.size()); std::sort(properties.begin(), properties.end(), Sort::lt); std::sort(methods.begin(), methods.end(), Sort::lt); @@ -1019,7 +1019,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const QQmlPropertyCacheMethodArguments *arguments = nullptr; if (data->hasArguments()) { arguments = data->arguments(); - for (int ii = 0, end = arguments->names ? arguments->names->length() : 0; + for (int ii = 0, end = arguments->names ? arguments->names->size() : 0; ii < end; ++ii) { if (ii != 0) signature.append(','); |