summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-04 06:31:06 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-04 06:32:39 (GMT)
commitc329db551237906cc659f3276c679d0e573edff2 (patch)
treed15cc1bab456de9b02e973da1cc81610fd17432a /tests/auto/declarative
parent49e7e1dccf38a8cf1aad88de037e590f7918b7ea (diff)
downloadQt-c329db551237906cc659f3276c679d0e573edff2.zip
Qt-c329db551237906cc659f3276c679d0e573edff2.tar.gz
Qt-c329db551237906cc659f3276c679d0e573edff2.tar.bz2
Fix grammar stringifying "on" as "readonly"
QTBUG-8676
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp15
2 files changed, 22 insertions, 0 deletions
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()
{