diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-03-25 07:42:21 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-03-25 07:42:21 (GMT) |
commit | 20779098f4eb73f8789d704e1a2818ddbbf5b4d2 (patch) | |
tree | b1c4e3edb447ee47f9bc724f106d1bbefcff5456 /src/declarative/qml/qdeclarativeintegercache.cpp | |
parent | 8cc346604ed1e1504964772613ed9fe531361f69 (diff) | |
parent | 194013d9db1b3e4ba6f56a864f3b64f523202948 (diff) | |
download | Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.zip Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.gz Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.bz2 |
Merge remote branch 'main/4.7' into 4.7
Conflicts:
demos/declarative/minehunt/minehunt.cpp
src/declarative/qml/qdeclarativecompiler.cpp
Diffstat (limited to 'src/declarative/qml/qdeclarativeintegercache.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeintegercache.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeintegercache.cpp b/src/declarative/qml/qdeclarativeintegercache.cpp index 8fa210f..be36471 100644 --- a/src/declarative/qml/qdeclarativeintegercache.cpp +++ b/src/declarative/qml/qdeclarativeintegercache.cpp @@ -64,6 +64,16 @@ void QDeclarativeIntegerCache::clear() engine = 0; } +QString QDeclarativeIntegerCache::findId(int value) const +{ + for (StringCache::ConstIterator iter = stringCache.begin(); + iter != stringCache.end(); ++iter) { + if (iter.value() && iter.value()->value == value) + return iter.key(); + } + return QString(); +} + void QDeclarativeIntegerCache::add(const QString &id, int value) { Q_ASSERT(!stringCache.contains(id)); |