diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-20 04:49:36 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-20 04:49:36 (GMT) |
commit | 78c78085449149b5c48bbecd49424974cdf79bee (patch) | |
tree | c56b323d7270bb3515d2d7277e366a8fa2e76e34 /tests/auto/declarative/qdeclarativeecmascript/data | |
parent | 27b09c283d68fa4b1eae32f82a1041bca1a28656 (diff) | |
download | Qt-78c78085449149b5c48bbecd49424974cdf79bee.zip Qt-78c78085449149b5c48bbecd49424974cdf79bee.tar.gz Qt-78c78085449149b5c48bbecd49424974cdf79bee.tar.bz2 |
Allow null to be assigned to object properties
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml | 9 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml new file mode 100644 index 0000000..3fd9131 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.1.qml @@ -0,0 +1,9 @@ +import Qt.test 1.0 + +MyQmlObject { + property bool runTest: false + + property variant a: MyQmlObject {} + + objectProperty: (runTest == false)?a:null +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml new file mode 100644 index 0000000..19b0c42 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml @@ -0,0 +1,11 @@ +import Qt.test 1.0 +import Qt 4.6 + +MyQmlObject { + objectProperty: MyQmlObject {} + + Component.onCompleted: { + objectProperty = null; + } +} + |