aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-02-06 10:50:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-06 12:00:15 +0100
commit40a977771a62b6c89a055d5fda2a92a12828473b (patch)
treef9af3a0eedb92a7b9f927251013147871f960114 /src/qml
parentf4536754b49d1aa39843dfa24c88c903a535ff35 (diff)
Use constFind instead of find in QQmlMetaType::qmlType
There is no need to detach when only checking for the presence of an item. Change-Id: I59a0aadb74b4613b019882bcf67e84e68df18a21 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlmetatype.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index e4f51474b9..2a2d0b3879 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -1531,7 +1531,7 @@ QQmlType *QQmlMetaType::qmlType(const QHashedStringRef &name, const QHashedStrin
QReadLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
- QQmlMetaTypeData::Names::ConstIterator it = data->nameToType.find(name);
+ QQmlMetaTypeData::Names::ConstIterator it = data->nameToType.constFind(name);
while (it != data->nameToType.end() && it.key() == name) {
// XXX version_major<0 just a kludge for QQmlPropertyPrivate::initProperty
if (version_major < 0 || (*it)->availableInVersion(module, version_major,version_minor))
@@ -1565,7 +1565,7 @@ QQmlType *QQmlMetaType::qmlType(const QMetaObject *metaObject, const QHashedStri
QReadLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
- QQmlMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.find(metaObject);
+ QQmlMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.constFind(metaObject);
while (it != data->metaObjectToType.end() && it.key() == metaObject) {
QQmlType *t = *it;
if (version_major < 0 || t->availableInVersion(module, version_major,version_minor))