summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecustomparser_p.h
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-06-25 06:38:23 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-06-25 06:38:23 (GMT)
commit1d986e7f4c34fdcda2c1486a271a387ec08d3c46 (patch)
treee47bfd90213ecaaeb88e02650676c5186d61450d /src/declarative/qml/qdeclarativecustomparser_p.h
parent03df7f73de6a1fd482876caaf377a61593df8a38 (diff)
parent46233eaa956e57a4c948cec759a3be606a8bdcb8 (diff)
downloadQt-1d986e7f4c34fdcda2c1486a271a387ec08d3c46.zip
Qt-1d986e7f4c34fdcda2c1486a271a387ec08d3c46.tar.gz
Qt-1d986e7f4c34fdcda2c1486a271a387ec08d3c46.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/qml/qdeclarativecustomparser_p.h')
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h
index 8eb86e8..509e30a 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;
@@ -136,8 +144,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) \