diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-24 03:32:37 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-24 03:40:28 (GMT) |
commit | 929488ba788549a9b38c1ab3784307b575a537a5 (patch) | |
tree | 0e7d47e0fe3b4ea2fcf8b8630039fa29f9587397 /src/declarative/qml/qdeclarativeintegercache.cpp | |
parent | 50e3f9dba978709c35c869ccaa8345719f23deb1 (diff) | |
download | Qt-929488ba788549a9b38c1ab3784307b575a537a5.zip Qt-929488ba788549a9b38c1ab3784307b575a537a5.tar.gz Qt-929488ba788549a9b38c1ab3784307b575a537a5.tar.bz2 |
Add object ids to the metadata provided in debugger classes.
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)); |