diff options
Diffstat (limited to 'src/declarative/qml/qmlparser_p.h')
-rw-r--r-- | src/declarative/qml/qmlparser_p.h | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index 7550870..d23b4ea 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -110,15 +110,17 @@ namespace QmlParser virtual ~Object(); // Type of the object. The integer is an index into the - // QmlCompiledData::types array, or -1 if the object is a fetched - // object. + // QmlCompiledData::types array, or -1 if the object is a property + // group. int type; // The url of this object if it is an external type. Used by the DOM QUrl url; // The name of this type QByteArray typeName; - // The id assigned to the object (if any). - QByteArray id; + // The id assigned to the object (if any). Set by the QmlCompiler + QString id; + // The id index assigned to the object (if any). Set by the QmlCompiler + int idIndex; // Custom parsed data QByteArray custom; // Returns the metaobject for this type, or 0 if not available. @@ -129,8 +131,9 @@ namespace QmlParser const QMetaObject *metatype; // The synthesized metaobject, if QML added signals or properties to // this type. Otherwise null - QMetaObject *extObjectData; QAbstractDynamicMetaObject extObject; + QByteArray metadata; // Generated by compiler + QByteArray synthdata; // Generated by compiler Property *getDefaultProperty(); Property *getProperty(const QByteArray &name, bool create=true); @@ -138,6 +141,22 @@ namespace QmlParser Property *defaultProperty; QHash<QByteArray, Property *> properties; + // Output of the compilation phase (these properties continue to exist + // in either the defaultProperty or properties members too) + void addValueProperty(Property *); + void addSignalProperty(Property *); + void addAttachedProperty(Property *); + void addGroupedProperty(Property *); + QList<Property *> valueProperties; + QList<Property *> signalProperties; + QList<Property *> attachedProperties; + QList<Property *> groupedProperties; + + // The bytes to cast instances by to get to the QmlParserStatus + // interface. -1 indicates the type doesn't support this interface. + // Set by the QmlCompiler. + int parserStatusCast; + LocationSpan location; struct DynamicProperty { @@ -150,7 +169,7 @@ namespace QmlParser Type type; QByteArray name; QmlParser::Property *defaultValue; - LocationRange range; + LocationSpan location; }; struct DynamicSignal { DynamicSignal(); @@ -242,8 +261,6 @@ namespace QmlParser SignalObject, // This is used as a signal expression assignment SignalExpression, - // This is used as an implicit component creation - Component, // This is used as an id assignment only Id }; @@ -281,6 +298,9 @@ namespace QmlParser // The metaobject index of this property, or -1 if unknown. int index; + // Returns true if this is an empty property - both value and values + // are unset. + bool isEmpty() const; // The list of values assigned to this property. Content in values // and value are mutually exclusive QList<Value *> values; @@ -291,6 +311,9 @@ namespace QmlParser QByteArray name; // True if this property was accessed as the default property. bool isDefault; + // True if the setting of this property will be deferred. Set by the + // QmlCompiler + bool isDeferred; LocationSpan location; LocationRange listValueRange; |