summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlintegercache.cpp29
-rw-r--r--src/declarative/qml/qmlintegercache_p.h2
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();