diff options
Diffstat (limited to 'tests/auto/qml/qqmllistreference/data')
-rw-r--r-- | tests/auto/qml/qqmllistreference/data/consoleLogSyntheticList.qml | 8 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistreference/data/listIgnoresNull.qml | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllistreference/data/consoleLogSyntheticList.qml b/tests/auto/qml/qqmllistreference/data/consoleLogSyntheticList.qml new file mode 100644 index 0000000000..9d2fd3e0b2 --- /dev/null +++ b/tests/auto/qml/qqmllistreference/data/consoleLogSyntheticList.qml @@ -0,0 +1,8 @@ +import QtQml + +QtObject { + id: self + + function createList() : list<QtObject> { return [self] } + Component.onCompleted: console.log(createList()) +} diff --git a/tests/auto/qml/qqmllistreference/data/listIgnoresNull.qml b/tests/auto/qml/qqmllistreference/data/listIgnoresNull.qml new file mode 100644 index 0000000000..35c8d66dad --- /dev/null +++ b/tests/auto/qml/qqmllistreference/data/listIgnoresNull.qml @@ -0,0 +1,21 @@ +import QtQuick 2.7 +import Test + +Item { + id: root + + TestItem { + id: testItem + } + + Component.onCompleted : { + testItem.data.push(null); + testItem.data.length = 5; + testItem.data.unshift(null); + + var state = Qt.createQmlObject( "import QtQuick 2.7; State{ name: 'MyState' }", root, "dynamicState" ); + root.states.length = 5; + root.states.push(null); + root.states.unshift(state); + } +} |