aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-26 10:26:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-02 14:48:49 +0100
commitbf47d66216e649fe947956e02edd0a4b24ddb0fe (patch)
tree93bb25f64d77c4a0e66a08d6feb1a1e6fef7269c /tests/auto/qml/qqmllanguage/testtypes.h
parent963875db263e4d1a04e03c4bb4fc20542bc8c21e (diff)
[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 <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.h')
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h8
1 files changed, 8 insertions, 0 deletions
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<QQmlCustomParserProperty> &props);
+ QByteArray compile(const QV4::CompiledData::QmlUnit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings);
+ void setCustomData(QObject *, const QByteArray &) {}
+};
+
class MyParserStatus : public QObject, public QQmlParserStatus
{
Q_INTERFACES(QQmlParserStatus)