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/v4/qv4ir_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/v4/qv4ir_p.h')
-rw-r--r-- | src/qml/qml/v4/qv4ir_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/v4/qv4ir_p.h b/src/qml/qml/v4/qv4ir_p.h index f6e20a7187..2c31d644e8 100644 --- a/src/qml/qml/v4/qv4ir_p.h +++ b/src/qml/qml/v4/qv4ir_p.h @@ -255,12 +255,12 @@ enum BuiltinSymbol { struct Name: Expr { enum Symbol { Unbound, - IdObject, // This is a load of a id object. Storage will always be IdStorage - AttachType, // This is a load of an attached object - ModuleObject, // This is a load of a module object - Object, // XXX what is this for? - Property, // This is a load of a regular property - Slot // XXX what is this for? + IdObject, // This is a load of a id object. Storage will always be IdStorage + AttachType, // This is a load of an attached object + SingletonObject, // This is a load of a singleton object + Object, // XXX what is this for? + Property, // This is a load of a regular property + Slot // XXX what is this for? }; enum Storage { @@ -545,7 +545,7 @@ struct BasicBlock { Name *SYMBOL(Name *base, Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, Name::Storage storage, quint16 line, quint16 column); Name *ID_OBJECT(const QString &id, const QQmlScript::Object *object, quint16 line, quint16 column); Name *ATTACH_TYPE(const QString &id, const QQmlType *attachType, Name::Storage storage, quint16 line, quint16 column); - Name *MODULE_OBJECT(const QString &id, const QQmlMetaObject &meta, Name::Storage storage, quint16 line, quint16 column); + Name *SINGLETON_OBJECT(const QString &id, const QQmlMetaObject &meta, Name::Storage storage, quint16 line, quint16 column); Expr *UNOP(AluOp op, Expr *expr); Expr *BINOP(AluOp op, Expr *left, Expr *right); |