diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-04 06:55:05 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-04 06:55:05 (GMT) |
commit | a72a611f99acee05d44a5622ce50d25cdbb70b77 (patch) | |
tree | 78f98b8b8833b24fadb8e9d4eee28e5035ff7f1e | |
parent | ff40702d547088266a09adb2d1b5d9a270334d21 (diff) | |
parent | c329db551237906cc659f3276c679d0e573edff2 (diff) | |
download | Qt-a72a611f99acee05d44a5622ce50d25cdbb70b77.zip Qt-a72a611f99acee05d44a5622ce50d25cdbb70b77.tar.gz Qt-a72a611f99acee05d44a5622ce50d25cdbb70b77.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
6 files changed, 27 insertions, 5 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index 7cf81b2..493ad25 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -1020,7 +1020,7 @@ case $rule_number: { JsIdentifier: T_ON ; /. case $rule_number: { - QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp index 0677bc5..89493ff 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp +++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h index 2b2e3d1..32bb12b 100644 --- a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h +++ b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeJSGrammar { public: - enum { + enum VariousConstants { EOF_SYMBOL = 0, REDUCE_HERE = 100, SHIFT_THERE = 99, diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index fd9e690..c86e047 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -516,7 +516,7 @@ case 66: { } case 67: { - QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml new file mode 100644 index 0000000..7cd6a83 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml @@ -0,0 +1,7 @@ +import Qt 4.6 + +QtObject { + property int on + + Component.onCompleted: on = 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 28daf29..a339a6d 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -128,6 +128,8 @@ private slots: void qmlAttachedPropertiesObjectMethod(); + void customOnProperty(); + // regression tests for crashes void crash1(); void crash2(); @@ -1397,6 +1399,19 @@ void tst_qdeclarativelanguage::crash2() QDeclarativeComponent component(&engine, TEST_FILE("crash2.qml")); } +// QTBUG-8676 +void tst_qdeclarativelanguage::customOnProperty() +{ + QDeclarativeComponent component(&engine, TEST_FILE("customOnProperty.qml")); + + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("on").toInt(), 10); + + delete object; +} void tst_qdeclarativelanguage::initTestCase() { |