diff options
-rw-r--r-- | src/qml/qml/qqmlapplicationengine.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlopenmetaobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlproxymetaobject.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 3 | ||||
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 4 |
7 files changed, 15 insertions, 16 deletions
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index 8c342e0592..30fc186391 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -134,7 +134,7 @@ void QQmlApplicationEnginePrivate::_q_finishLoad(QObject *o) break; case QQmlComponent::Ready: objects << c->create(); - q->objectCreated(objects.last(), c->url()); + q->objectCreated(objects.constLast(), c->url()); break; case QQmlComponent::Loading: case QQmlComponent::Null: diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 271b4f1b31..ce0f4b798a 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -634,7 +634,7 @@ void QQmlTypePrivate::init() const QMetaObject *mmo = builder.toMetaObject(); mmo->d.superdata = baseMetaObject; if (!metaObjects.isEmpty()) - metaObjects.last().metaObject->d.superdata = mmo; + metaObjects.constLast().metaObject->d.superdata = mmo; QQmlProxyMetaObject::ProxyData data = { mmo, t->d->extraData.cd->extFunc, 0, 0 }; metaObjects << data; } @@ -656,7 +656,7 @@ void QQmlTypePrivate::init() const if (metaObjects.isEmpty()) mo = baseMetaObject; else - mo = metaObjects.first().metaObject; + mo = metaObjects.constFirst().metaObject; for (int ii = 0; !containsRevisionedAttributes && ii < mo->propertyCount(); ++ii) { if (isPropertyRevisioned(mo, ii)) @@ -851,7 +851,7 @@ const QMetaObject *QQmlType::metaObject() const if (d->metaObjects.isEmpty()) return d->baseMetaObject; else - return d->metaObjects.first().metaObject; + return d->metaObjects.constFirst().metaObject; } @@ -1861,7 +1861,7 @@ QQmlType *QQmlMetaType::qmlTypeFromIndex(int idx) if (idx < 0 || idx >= data->types.count()) return 0; - return data->types[idx]; + return data->types.at(idx); } /*! diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp index 0fd9e63bde..49f02476a2 100644 --- a/src/qml/qml/qqmlopenmetaobject.cpp +++ b/src/qml/qml/qqmlopenmetaobject.cpp @@ -278,7 +278,7 @@ int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void * propertyRead(propId); *reinterpret_cast<QVariant *>(a[0]) = d->getData(propId); } else if (c == QMetaObject::WriteProperty) { - if (propId >= d->data.count() || d->data[propId].first != *reinterpret_cast<QVariant *>(a[0])) { + if (propId >= d->data.count() || d->data.at(propId).first != *reinterpret_cast<QVariant *>(a[0])) { propertyWrite(propId); QPair<QVariant, bool> &prop = d->getDataRef(propId); prop.first = propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0])); diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 31218f5e4c..71b3fd8309 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -195,7 +195,7 @@ void QQmlPropertyData::load(const QMetaMethod &m) if (m.parameterCount()) { flags.hasArguments = true; - if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) { + if ((m.parameterCount() == 1) && (m.parameterTypes().constFirst() == "QQmlV4Function*")) { flags.isV4Function = true; } } @@ -231,7 +231,7 @@ void QQmlPropertyData::lazyLoad(const QMetaMethod &m) const int paramCount = m.parameterCount(); if (paramCount) { flags.hasArguments = true; - if ((paramCount == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) { + if ((paramCount == 1) && (m.parameterTypes().constFirst() == "QQmlV4Function*")) { flags.isV4Function = true; } } @@ -390,7 +390,7 @@ void QQmlPropertyCache::appendSignal(const QString &name, QQmlPropertyData::Flag signalHandlerIndexCache.append(handler); QString handlerName = QLatin1String("on") + name; - handlerName[2] = handlerName[2].toUpper(); + handlerName[2] = handlerName.at(2).toUpper(); setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0)); setNamedProperty(handlerName, signalHandlerIndex + signalOffset(), signalHandlerIndexCache.data() + signalHandlerIndex, (old != 0)); diff --git a/src/qml/qml/qqmlproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp index bbaab1e155..27e3c13ff8 100644 --- a/src/qml/qml/qqmlproxymetaobject.cpp +++ b/src/qml/qml/qqmlproxymetaobject.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE QQmlProxyMetaObject::QQmlProxyMetaObject(QObject *obj, QList<ProxyData> *mList) : metaObjects(mList), proxies(0), parent(0), object(obj) { - *static_cast<QMetaObject *>(this) = *metaObjects->first().metaObject; + *static_cast<QMetaObject *>(this) = *metaObjects->constFirst().metaObject; QObjectPrivate *op = QObjectPrivate::get(obj); if (op->metaObject) @@ -71,7 +71,7 @@ int QQmlProxyMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void if ((c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty) && - id >= metaObjects->last().propertyOffset) { + id >= metaObjects->constLast().propertyOffset) { for (int ii = 0; ii < metaObjects->count(); ++ii) { const ProxyData &data = metaObjects->at(ii); @@ -107,7 +107,7 @@ int QQmlProxyMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void } } } else if (c == QMetaObject::InvokeMetaMethod && - id >= metaObjects->last().methodOffset) { + id >= metaObjects->constLast().methodOffset) { QMetaMethod m = object->metaObject()->method(id); if (m.methodType() == QMetaMethod::Signal) { QMetaObject::activate(object, id, a); diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 40a2c596e3..75bc98f278 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2002,8 +2002,7 @@ void QQmlTypeLoader::trimCache() break; while (!unneededTypes.isEmpty()) { - TypeCache::Iterator iter = unneededTypes.last(); - unneededTypes.removeLast(); + TypeCache::Iterator iter = unneededTypes.takeLast(); iter.value()->release(); m_typeCache.erase(iter); diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 201d634411..3f56cc24e2 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -502,7 +502,7 @@ ReturnedValue NodePrototype::method_get_firstChild(CallContext *ctx) if (r->d()->d->children.isEmpty()) return Encode::null(); else - return Node::create(scope.engine, r->d()->d->children.first()); + return Node::create(scope.engine, r->d()->d->children.constFirst()); } ReturnedValue NodePrototype::method_get_lastChild(CallContext *ctx) @@ -515,7 +515,7 @@ ReturnedValue NodePrototype::method_get_lastChild(CallContext *ctx) if (r->d()->d->children.isEmpty()) return Encode::null(); else - return Node::create(scope.engine, r->d()->d->children.last()); + return Node::create(scope.engine, r->d()->d->children.constLast()); } ReturnedValue NodePrototype::method_get_previousSibling(CallContext *ctx) |