diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-06-25 04:26:23 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-06-25 04:26:23 (GMT) |
commit | 2d7e341646e302506531cb0bf87b8da5d088c319 (patch) | |
tree | 1d7c54b777005523557aa4ff6afcedfb3636bff0 /src/declarative/qml/qdeclarativecustomparser_p.h | |
parent | e0913d038b3df628bc180d397681b9e6ec53a75c (diff) | |
download | Qt-2d7e341646e302506531cb0bf87b8da5d088c319.zip Qt-2d7e341646e302506531cb0bf87b8da5d088c319.tar.gz Qt-2d7e341646e302506531cb0bf87b8da5d088c319.tar.bz2 |
Allow custom parsers to handle attached properties
QTBUG-11283
Diffstat (limited to 'src/declarative/qml/qdeclarativecustomparser_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativecustomparser_p.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h index 0e397c5..1a746b4 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/declarative/qml/qdeclarativecustomparser_p.h @@ -113,10 +113,18 @@ private: class Q_DECLARATIVE_EXPORT QDeclarativeCustomParser { public: - QDeclarativeCustomParser() : compiler(0), object(0) {} + enum Flag { + NoFlag = 0x00000000, + AcceptsAttachedProperties = 0x00000001 + }; + Q_DECLARE_FLAGS(Flags, Flag); + + QDeclarativeCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} + QDeclarativeCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} virtual ~QDeclarativeCustomParser() {} void clearErrors(); + Flags flags() const { return m_flags; } virtual QByteArray compile(const QList<QDeclarativeCustomParserProperty> &)=0; virtual void setCustomData(QObject *, const QByteArray &)=0; @@ -134,8 +142,10 @@ private: QList<QDeclarativeError> exceptions; QDeclarativeCompiler *compiler; QDeclarativeParser::Object *object; + Flags m_flags; friend class QDeclarativeCompiler; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeCustomParser::Flags); #if 0 #define QML_REGISTER_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \ |