diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-08-14 11:44:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 04:32:48 +0200 |
commit | 70a2c0491d66aa05f9e9e67f8a845f4df84da857 (patch) | |
tree | 08d7828cfb6950926e1176ee420d5e15dedd9817 /src/qml/qml/qqmltypenamecache_p.h | |
parent | 3912bbaceab166eb116447311eb16453e4f26edf (diff) |
Refactor singleton type registration code
Previously each singleton type was registered as an implicit separate
import. This commit changes the code so that these types are treated
just like any other type in the registration sense.
It also ensures that singleton types are instantiated per-engine.
Change-Id: I5c81c4ca5bf65210f7125d74a62a282a21838068
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmltypenamecache_p.h')
-rw-r--r-- | src/qml/qml/qqmltypenamecache_p.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h index 841c5aef6b..3e6afab470 100644 --- a/src/qml/qml/qqmltypenamecache_p.h +++ b/src/qml/qml/qqmltypenamecache_p.h @@ -74,7 +74,6 @@ public: inline bool isEmpty() const; void add(const QHashedString &name, int sciptIndex = -1, const QHashedString &nameSpace = QHashedString()); - void addSingletonType(const QHashedString &name, QQmlMetaType::SingletonInstance *apiInstance, const QHashedString &nameSpace = QHashedString()); struct Result { inline Result(); @@ -93,7 +92,6 @@ public: Result query(const QHashedStringRef &, const void *importNamespace); Result query(const QHashedV8String &); Result query(const QHashedV8String &, const void *importNamespace); - QQmlMetaType::SingletonInstance *singletonType(const void *importNamespace); private: friend class QQmlImports; @@ -101,7 +99,6 @@ private: struct Import { inline Import(); // Imported module - QQmlMetaType::SingletonInstance *singletonType; QVector<QQmlTypeModuleVersion> modules; // Or, imported script @@ -173,7 +170,7 @@ bool QQmlTypeNameCache::Result::isValid() const } QQmlTypeNameCache::Import::Import() -: singletonType(0), scriptIndex(-1) +: scriptIndex(-1) { } |