diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-12-10 23:07:49 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-12-10 23:09:02 (GMT) |
commit | cf01cfb8275c785d21eb5867c968cac1f54d296e (patch) | |
tree | daae21a78efe2a5affa4ba2e00d36c833f931bce /tests/auto/declarative/qmllanguage | |
parent | 7b45f8dd55bc1b02f20913cf77441fb1069603b1 (diff) | |
download | Qt-cf01cfb8275c785d21eb5867c968cac1f54d296e.zip Qt-cf01cfb8275c785d21eb5867c968cac1f54d296e.tar.gz Qt-cf01cfb8275c785d21eb5867c968cac1f54d296e.tar.bz2 |
Generate error when attempting to write to a read-only object property.
Diffstat (limited to 'tests/auto/declarative/qmllanguage')
4 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmllanguage/data/HelperAlias.qml b/tests/auto/declarative/qmllanguage/data/HelperAlias.qml new file mode 100644 index 0000000..dc3b382 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/HelperAlias.qml @@ -0,0 +1,9 @@ +import Test 1.0 +import Qt 4.6 + +QtObject { + property var child + child: QtObject { id: obj } + property alias objAlias: obj; +} + diff --git a/tests/auto/declarative/qmllanguage/data/readOnly.3.errors.txt b/tests/auto/declarative/qmllanguage/data/readOnly.3.errors.txt new file mode 100644 index 0000000..c7e9e1b --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/readOnly.3.errors.txt @@ -0,0 +1 @@ +6:36:Invalid property assignment: "objAlias" is a read-only property diff --git a/tests/auto/declarative/qmllanguage/data/readOnly.3.qml b/tests/auto/declarative/qmllanguage/data/readOnly.3.qml new file mode 100644 index 0000000..cd86a48 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/readOnly.3.qml @@ -0,0 +1,8 @@ +import Test 1.0 +import Qt 4.6 + +QtObject { + property var child + child: HelperAlias { objAlias: QtObject {} } +} + diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index 4bca21a..160998f 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -229,6 +229,7 @@ void tst_qmllanguage::errors_data() QTest::newRow("readOnly.1") << "readOnly.1.qml" << "readOnly.1.errors.txt" << false; QTest::newRow("readOnly.2") << "readOnly.2.qml" << "readOnly.2.errors.txt" << false; + QTest::newRow("readOnly.3") << "readOnly.3.qml" << "readOnly.3.errors.txt" << false; QTest::newRow("listAssignment.1") << "listAssignment.1.qml" << "listAssignment.1.errors.txt" << false; QTest::newRow("listAssignment.2") << "listAssignment.2.qml" << "listAssignment.2.errors.txt" << false; |