aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-11-20 09:07:52 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-29 14:39:22 +0100
commitefc3cc717ac1a62965465e909cc99acef627cdb1 (patch)
tree9d181ca8e9e299fa99b9b7598bfb83bc53056dde /src/qml/qml/qqmlengine.cpp
parent65953304a2775e69c7edd46b780aa39f769d32ac (diff)
Make QQmlPropertyCache available in QJSEngine
The QQmlEngine has two containers for property caches, one for QML types and one for all-purpose meta-objects. The latter is rather useful and now being moved to QJSEngine to be available there. Change-Id: Ieab65c400b8a2e410e5f9eee6d603162dbb864d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index f9de7adc93..8f2c554a7e 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -559,7 +559,7 @@ QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e)
activeObjectCreator(0),
networkAccessManager(0), networkAccessManagerFactory(0), urlInterceptor(0),
scarceResourcesRefCount(0), typeLoader(e), importDatabase(e), uniqueId(1),
- incubatorCount(0), incubationController(0), mutex(QMutex::Recursive)
+ incubatorCount(0), incubationController(0)
{
}
@@ -582,8 +582,6 @@ QQmlEnginePrivate::~QQmlEnginePrivate()
if (incubationController) incubationController->d = 0;
incubationController = 0;
- for(QHash<const QMetaObject *, QQmlPropertyCache *>::Iterator iter = propertyCache.begin(); iter != propertyCache.end(); ++iter)
- (*iter)->release();
for(QHash<QPair<QQmlType *, int>, QQmlPropertyCache *>::Iterator iter = typePropertyCache.begin(); iter != typePropertyCache.end(); ++iter)
(*iter)->release();
for (QHash<int, QQmlCompiledData *>::Iterator iter = m_compositeTypes.begin(); iter != m_compositeTypes.end(); ++iter)
@@ -2043,22 +2041,6 @@ QString QQmlEngine::offlineStoragePath() const
return d->offlineStoragePath;
}
-QQmlPropertyCache *QQmlEnginePrivate::createCache(const QMetaObject *mo)
-{
- Q_Q(QQmlEngine);
-
- if (!mo->superClass()) {
- QQmlPropertyCache *rv = new QQmlPropertyCache(q, mo);
- propertyCache.insert(mo, rv);
- return rv;
- } else {
- QQmlPropertyCache *super = cache(mo->superClass());
- QQmlPropertyCache *rv = super->copyAndAppend(mo);
- propertyCache.insert(mo, rv);
- return rv;
- }
-}
-
QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersion,
QQmlError &error)
{