diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-06 16:55:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 15:33:19 +0100 |
commit | 99efe4309379482fce5c231885883e359bf85290 (patch) | |
tree | dbb9333a547fa1939bd63bd64136611e9fe82968 /src/qml/qml/qqmlcustomparser_p.h | |
parent | 9fc17c08e5635cf112c6194e6c24af2a9c7caf00 (diff) |
Remove old compiler and VME
This removes the bulk of the code. A few smaller cleanups remain, to be
done in smaller changes as they move code around.
Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData,
which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not
do anything and the class is gone now :)
Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcustomparser_p.h')
-rw-r--r-- | src/qml/qml/qqmlcustomparser_p.h | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/src/qml/qml/qqmlcustomparser_p.h b/src/qml/qml/qqmlcustomparser_p.h index 4861456c3d..8d98cf6423 100644 --- a/src/qml/qml/qqmlcustomparser_p.h +++ b/src/qml/qml/qqmlcustomparser_p.h @@ -63,51 +63,6 @@ QT_BEGIN_NAMESPACE - -class QQmlCompiler; - -class QQmlCustomParserPropertyPrivate; -class Q_QML_PRIVATE_EXPORT QQmlCustomParserProperty -{ -public: - QQmlCustomParserProperty(); - QQmlCustomParserProperty(const QQmlCustomParserProperty &); - QQmlCustomParserProperty &operator=(const QQmlCustomParserProperty &); - ~QQmlCustomParserProperty(); - - QString name() const; - QQmlScript::Location location() const; - - bool isList() const; - // Will be one of QQmlScript::Variant, QQmlCustomParserProperty or - // QQmlCustomParserNode - QList<QVariant> assignedValues() const; - -private: - friend class QQmlCustomParserNodePrivate; - friend class QQmlCustomParserPropertyPrivate; - QQmlCustomParserPropertyPrivate *d; -}; - -class QQmlCustomParserNodePrivate; -class Q_QML_PRIVATE_EXPORT QQmlCustomParserNode -{ -public: - QQmlCustomParserNode(); - QQmlCustomParserNode(const QQmlCustomParserNode &); - QQmlCustomParserNode &operator=(const QQmlCustomParserNode &); - ~QQmlCustomParserNode(); - - QString name() const; - QQmlScript::Location location() const; - - QList<QQmlCustomParserProperty> properties() const; - -private: - friend class QQmlCustomParserNodePrivate; - QQmlCustomParserNodePrivate *d; -}; - struct QQmlCustomParserCompilerBackend { virtual ~QQmlCustomParserCompilerBackend() {} @@ -116,7 +71,6 @@ struct QQmlCustomParserCompilerBackend int evaluateEnum(const QString &scope, const QByteArray& enumValue, bool *ok) const; const QMetaObject *resolveType(const QString& name) const; - virtual QQmlBinding::Identifier bindingIdentifier(const QQmlScript::Variant&, const QString&, QQmlCustomParser *) { return QQmlBinding::Invalid; } virtual QQmlBinding::Identifier bindingIdentifier(const QV4::CompiledData::Binding *, QQmlCustomParser *) { return QQmlBinding::Invalid; } virtual QQmlJS::AST::Node *astForBinding(int, int) const { return 0; } @@ -132,23 +86,19 @@ public: }; Q_DECLARE_FLAGS(Flags, Flag) - QQmlCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} - QQmlCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} + QQmlCustomParser() : compiler(0), m_flags(NoFlag) {} + QQmlCustomParser(Flags f) : compiler(0), m_flags(f) {} virtual ~QQmlCustomParser() {} void clearErrors(); Flags flags() const { return m_flags; } - virtual QByteArray compile(const QList<QQmlCustomParserProperty> &)=0; virtual QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &bindings) = 0; virtual void setCustomData(QObject *, const QByteArray &)=0; QList<QQmlError> errors() const { return exceptions; } protected: - void error(const QString& description); - void error(const QQmlCustomParserProperty&, const QString& description); - void error(const QQmlCustomParserNode&, const QString& description); void error(const QV4::CompiledData::Binding *binding, const QString& description) { error(binding->location, description); } void error(const QV4::CompiledData::Object *object, const QString& description) @@ -159,7 +109,6 @@ protected: const QMetaObject *resolveType(const QString&) const; - QQmlBinding::Identifier bindingIdentifier(const QQmlScript::Variant&, const QString&); QQmlBinding::Identifier bindingIdentifier(const QV4::CompiledData::Binding *binding); QQmlJS::AST::Node *astForBinding(int objectIndex, int scriptIndex) const; @@ -167,9 +116,7 @@ protected: private: QList<QQmlError> exceptions; QQmlCustomParserCompilerBackend *compiler; - QQmlScript::Object *object; Flags m_flags; - friend class QQmlCompiler; friend class QQmlPropertyValidator; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlCustomParser::Flags) @@ -181,7 +128,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlCustomParser::Flags) QT_END_NAMESPACE -Q_DECLARE_METATYPE(QQmlCustomParserProperty) -Q_DECLARE_METATYPE(QQmlCustomParserNode) - #endif |