diff options
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativexmllistmodel/data')
12 files changed, 0 insertions, 295 deletions
diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/get.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/get.qml deleted file mode 100644 index 4e03503f90..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/get.qml +++ /dev/null @@ -1,61 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "name/string()" } - XmlRole { name: "type"; query: "type/string()" } - XmlRole { name: "age"; query: "age/number()" } - XmlRole { name: "size"; query: "size/string()" } - - id: root - - property bool preTest: false - property bool postTest: false - - function runPreTest() { - if (root.get(0) != undefined) - return; - - preTest = true; - } - - function runPostTest() { - if (root.get(-1) != undefined) - return; - - var row = root.get(0); - if (row.name != "Polly" || - row.type != "Parrot" || - row.age != 12 || - row.size != "Small") - return; - - row = root.get(1); - if (row.name != "Penny" || - row.type != "Turtle" || - row.age != 4 || - row.size != "Small") - return; - - row = root.get(7); - if (row.name != "Rover" || - row.type != "Dog" || - row.age != 0 || - row.size != "Large") - return; - - row = root.get(8); - if (row.name != "Tiny" || - row.type != "Elephant" || - row.age != 15 || - row.size != "Large") - return; - - if (root.get(9) != undefined) - return; - - postTest = true; - } -} - diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.qml deleted file mode 100644 index fdacb6c445..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "name/string()" } - XmlRole { name: "type"; query: "type/string()" } - XmlRole { name: "age"; query: "age/number()" } - XmlRole { name: "size"; query: "size/string()" } -} diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.xml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.xml deleted file mode 100644 index 40cd6d0432..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model.xml +++ /dev/null @@ -1,54 +0,0 @@ -<Pets> - <Pet> - <name>Polly</name> - <type>Parrot</type> - <age>12</age> - <size>Small</size> - </Pet> - <Pet> - <name>Penny</name> - <type>Turtle</type> - <age>4</age> - <size>Small</size> - </Pet> - <Pet> - <name>Warren</name> - <type>Rabbit</type> - <age>2</age> - <size>Small</size> - </Pet> - <Pet> - <name>Spot</name> - <type>Dog</type> - <age>9</age> - <size>Medium</size> - </Pet> - <Pet> - <name>Whiskers</name> - <type>Cat</type> - <age>2</age> - <size>Medium</size> - </Pet> - <Pet> - <name>Joey</name> - <type>Kangaroo</type> - <age>1</age> - </Pet> - <Pet> - <name>Kimba</name> - <type>Bunny</type> - <age>65</age> - <size>Large</size> - </Pet> - <Pet> - <name>Rover</name> - <type>Dog</type> - <size>Large</size> - </Pet> - <Pet> - <name>Tiny</name> - <type>Elephant</type> - <age>15</age> - <size>Large</size> - </Pet> -</Pets> diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model2.xml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model2.xml deleted file mode 100644 index dab2ec6dc0..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/model2.xml +++ /dev/null @@ -1,14 +0,0 @@ -<Pets> - <Pet> - <name>Polly</name> - <type>Parrot</type> - <age>12</age> - <size>Small</size> - </Pet> - <Pet> - <name>Penny</name> - <type>Turtle</type> - <age>4</age> - <size>Small</size> - </Pet> -</Pets> diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/propertychanges.qml deleted file mode 100644 index ed674ce36f..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/propertychanges.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { objectName: "role"; name: "name"; query: "name/string()" } - XmlRole { name: "type"; query: "type/string()" } - XmlRole { name: "age"; query: "age/number()" } - XmlRole { name: "size"; query: "size/string()" } -} diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.qml deleted file mode 100644 index 6345101d9a..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "recipes.xml" - query: "/recipes/recipe" - XmlRole { name: "title"; query: "@title/string()" } - XmlRole { name: "picture"; query: "picture/string()" } - XmlRole { name: "ingredients"; query: "ingredients/string()" } - XmlRole { name: "preparation"; query: "method/string()" } -} diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.xml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.xml deleted file mode 100644 index d71de60710..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/recipes.xml +++ /dev/null @@ -1,90 +0,0 @@ -<recipes> - <recipe title="Pancakes"> - <picture>content/pics/pancakes.jpg</picture> - <ingredients><![CDATA[<html> - <ul> - <li> 1 cup (150g) self-raising flour - <li> 1 tbs caster sugar - <li> 3/4 cup (185ml) milk - <li> 1 egg - </ul> - </html> - ]]></ingredients> - <method><![CDATA[<html> - <ol> - <li> Sift flour and sugar together into a bowl. Add a pinch of salt. - <li> Beat milk and egg together, then add to dry ingredients. Beat until smooth. - <li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. - <li> Turn over and cook other side until golden. - </ol> - </html> - ]]></method> - </recipe> - <recipe title="Fruit Salad"> - <picture>content/pics/fruit-salad.jpg</picture> - <ingredients><![CDATA[* Seasonal Fruit]]></ingredients> - <method><![CDATA[* Chop fruit and place in a bowl.]]></method> - </recipe> - <recipe title="Vegetable Soup"> - <picture>content/pics/vegetable-soup.jpg</picture> - <ingredients><![CDATA[<html> - <ul> - <li> 1 onion - <li> 1 turnip - <li> 1 potato - <li> 1 carrot - <li> 1 head of celery - <li> 1 1/2 litres of water - </ul> - </html> - ]]></ingredients> - <method><![CDATA[<html> - <ol> - <li> Chop vegetables. - <li> Boil in water until vegetables soften. - <li> Season with salt and pepper to taste. - </ol> - </html> - ]]></method> - </recipe> - <recipe title="Hamburger"> - <picture>content/pics/hamburger.jpg</picture> - <ingredients><![CDATA[<html> - <ul> - <li> 500g minced beef - <li> Seasoning - <li> lettuce, tomato, onion, cheese - <li> 1 hamburger bun for each burger - </ul> - </html> - ]]></ingredients> - <method><![CDATA[<html> - <ol> - <li> Mix the beef, together with seasoning, in a food processor. - <li> Shape the beef into burgers. - <li> Grill the burgers for about 5 mins on each side (until cooked through) - <li> Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. - </ol> - </html> - ]]></method> - </recipe> - <recipe title="Lemonade"> - <picture>content/pics/lemonade.jpg</picture> - <ingredients><![CDATA[<html> - <ul> - <li> 1 cup Lemon Juice - <li> 1 cup Sugar - <li> 6 Cups of Water (2 cups warm water, 4 cups cold water) - </ul> - </html> - ]]></ingredients> - <method><![CDATA[<html> - <ol> - <li> Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. - <li> Pour in lemon juice, stir again, and add 4 cups of cold water. - <li> Chill or serve over ice cubes. - </ol> - </html> - ]]></method> - </recipe> -</recipes> diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleCrash.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleCrash.qml deleted file mode 100644 index 492dad920f..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleCrash.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - id: model - XmlRole {} - Component.onCompleted: model.roles = 0 -} diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleErrors.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleErrors.qml deleted file mode 100644 index a0d846f188..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleErrors.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "/name/string()" } //starts with '/' - XmlRole { name: "type"; query: "type" } //no type - XmlRole { name: "age"; query: "age/" } //ends with '/' - XmlRole { name: "size"; query: "size/number()" } //wrong type -} diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleKeys.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleKeys.qml deleted file mode 100644 index d90cd61096..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/roleKeys.qml +++ /dev/null @@ -1,13 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - query: "/data/item" - XmlRole { id: nameRole; name: "name"; query: "name/string()"; isKey: true } - XmlRole { name: "age"; query: "age/number()"; isKey: true } - XmlRole { name: "sport"; query: "sport/string()" } - - function disableNameKey() { - nameRole.isKey = false; - } -} - diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/testtypes.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/testtypes.qml deleted file mode 100644 index 4dbcc029e0..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/testtypes.qml +++ /dev/null @@ -1,8 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - query: "/data" - XmlRole { name: "stringValue"; query: "a-string/string()" } - XmlRole { name: "numberValue"; query: "a-number/number()" } -} - diff --git a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/unique.qml b/tests/auto/qtquick1/qdeclarativexmllistmodel/data/unique.qml deleted file mode 100644 index dab8ffa78e..0000000000 --- a/tests/auto/qtquick1/qdeclarativexmllistmodel/data/unique.qml +++ /dev/null @@ -1,8 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "name/string()" } - XmlRole { name: "name"; query: "type/string()" } -} |