diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-06 01:33:49 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-06 01:33:49 (GMT) |
commit | b67eb53839bd1b9513935b62be845274a1641584 (patch) | |
tree | 7e046bedf204a0ce0c1b5bc2c9e2ce5d418b71f8 /src | |
parent | b77e93d94069889b2e9c7e2ade13b17d0bc4eaa4 (diff) | |
download | Qt-b67eb53839bd1b9513935b62be845274a1641584.zip Qt-b67eb53839bd1b9513935b62be845274a1641584.tar.gz Qt-b67eb53839bd1b9513935b62be845274a1641584.tar.bz2 |
Remove dead code
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qmlintegercache.cpp | 29 | ||||
-rw-r--r-- | src/declarative/qml/qmlintegercache_p.h | 2 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/declarative/qml/qmlintegercache.cpp b/src/declarative/qml/qmlintegercache.cpp index b20b6eb..d1927b3 100644 --- a/src/declarative/qml/qmlintegercache.cpp +++ b/src/declarative/qml/qmlintegercache.cpp @@ -82,33 +82,4 @@ int QmlIntegerCache::value(const QString &id) return d?d->value:-1; } -QmlIntegerCache *QmlIntegerCache::createForEnums(QmlType *type, QmlEngine *engine) -{ - Q_ASSERT(type); - Q_ASSERT(engine); - - QmlIntegerCache *cache = new QmlIntegerCache(engine); - - const QMetaObject *mo = type->metaObject(); - - for (int ii = mo->enumeratorCount() - 1; ii >= 0; --ii) { - QMetaEnum enumerator = mo->enumerator(ii); - - for (int jj = 0; jj < enumerator.keyCount(); ++jj) { - QString name = QString::fromUtf8(enumerator.key(jj)); - int value = enumerator.value(jj); - - if (!name.at(0).isUpper()) - continue; - - if (cache->stringCache.contains(name)) - continue; - - cache->add(name, value); - } - } - - return cache; -} - QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlintegercache_p.h b/src/declarative/qml/qmlintegercache_p.h index 7816004..2b10dcc 100644 --- a/src/declarative/qml/qmlintegercache_p.h +++ b/src/declarative/qml/qmlintegercache_p.h @@ -73,8 +73,6 @@ public: int value(const QString &); inline int value(const QScriptDeclarativeClass::Identifier &id) const; - static QmlIntegerCache *createForEnums(QmlType *, QmlEngine *); - protected: virtual void clear(); |