diff options
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 1bdeacd524..3ed8dbccff 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -208,7 +208,7 @@ public: QString offlineStorageDatabaseDirectory() const; // These methods may be called from the loader thread - inline QQmlPropertyCache *cache(QQmlType *, int); + inline QQmlPropertyCache *cache(const QQmlType &, int); using QJSEnginePrivate::cache; // These methods may be called from the loader thread @@ -260,11 +260,11 @@ public: private: // Must be called locked - QQmlPropertyCache *createCache(QQmlType *, int); + QQmlPropertyCache *createCache(const QQmlType &, int); // These members must be protected by a QQmlEnginePrivate::Locker as they are required by // the threaded loader. Only access them through their respective accessor methods. - QHash<QPair<QQmlType *, int>, QQmlPropertyCache *> typePropertyCache; + QHash<QPair<QQmlType, int>, QQmlPropertyCache *> typePropertyCache; QHash<int, int> m_qmlLists; QHash<int, QV4::CompiledData::CompilationUnit *> m_compositeTypes; static bool s_designerMode; @@ -375,12 +375,12 @@ Returns a QQmlPropertyCache for \a type with \a minorVersion. The returned cache is not referenced, so if it is to be stored, call addref(). */ -QQmlPropertyCache *QQmlEnginePrivate::cache(QQmlType *type, int minorVersion) +QQmlPropertyCache *QQmlEnginePrivate::cache(const QQmlType &type, int minorVersion) { - Q_ASSERT(type); + Q_ASSERT(type.isValid()); - if (minorVersion == -1 || !type->containsRevisionedAttributes()) - return cache(type->metaObject()); + if (minorVersion == -1 || !type.containsRevisionedAttributes()) + return cache(type.metaObject()); Locker locker(this); QQmlPropertyCache *rv = typePropertyCache.value(qMakePair(type, minorVersion)); |