From bf47d66216e649fe947956e02edd0a4b24ddb0fe Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 26 Feb 2014 10:26:51 +0100 Subject: [new compiler] Fix evaluateEnum for custom parsers When storing the string for a script binding - next to to the AST node - then for expression statements skip the (potentially synthetically inserted) semicolon. Its omission is required for the use of QQmlCustomParser::evaluateEnum. Change-Id: I3b556fd6a884f5c9c290d7d793eeab4dd135343e Reviewed-by: Lars Knoll --- tests/auto/qml/qqmllanguage/testtypes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/auto/qml/qqmllanguage/testtypes.h') diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 0416258075..27ad340256 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -723,6 +723,14 @@ public: void setCustomData(QObject *, const QByteArray &) {} }; +class EnumSupportingCustomParser : public QQmlCustomParser +{ +public: + QByteArray compile(const QList &props); + QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList &bindings); + void setCustomData(QObject *, const QByteArray &) {} +}; + class MyParserStatus : public QObject, public QQmlParserStatus { Q_INTERFACES(QQmlParserStatus) -- cgit v1.2.3