aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick1/qdeclarativefocusscope/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativefocusscope/data')
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/chain.qml28
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/forceActiveFocus.qml26
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/forcefocus.qml81
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/qtBug13380.qml24
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/signalEmission.qml33
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/test.qml77
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/test2.qml39
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/test3.qml52
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/test4.qml76
-rw-r--r--tests/auto/qtquick1/qdeclarativefocusscope/data/test5.qml84
10 files changed, 0 insertions, 520 deletions
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/chain.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/chain.qml
deleted file mode 100644
index a40bc2cdd6..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/chain.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- id: root
- width:300; height:400
-
- property bool focus1: root.activeFocus
- property bool focus2: item1.activeFocus
- property bool focus3: fs1.activeFocus
- property bool focus4: fs2.activeFocus
- property bool focus5: theItem.activeFocus
-
- Item {
- id: item1
- FocusScope {
- id: fs1
- focus: true
- FocusScope {
- id: fs2
- focus: true
- Item {
- id: theItem
- focus: true
- }
- }
- }
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/forceActiveFocus.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/forceActiveFocus.qml
deleted file mode 100644
index 6c39d4a432..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/forceActiveFocus.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- objectName: "root"
- FocusScope {
- objectName: "scope"
- Item {
- objectName: "item-a1"
- FocusScope {
- objectName: "scope-a"
- Item {
- objectName: "item-a2"
- }
- }
- }
- Item {
- objectName: "item-b1"
- FocusScope {
- objectName: "scope-b"
- Item {
- objectName: "item-b2"
- }
- }
- }
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/forcefocus.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/forcefocus.qml
deleted file mode 100644
index 708e899146..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/forcefocus.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- width: 800; height: 600
-
- FocusScope {
- focus: true
-
- FocusScope {
- id: firstScope
- objectName: "item0"
- focus: true
-
- Rectangle {
- height: 120; width: 420
-
- color: "transparent"
- border.width: 5; border.color: firstScope.activeFocus?"blue":"black"
-
- Rectangle {
- id: item1; objectName: "item1"
- x: 10; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: activeFocus?"blue":"black"
- focus: true
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item2; objectName: "item2"
- x: 310; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: activeFocus?"blue":"black"
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
- }
- }
-
- FocusScope {
- id: secondScope
- objectName: "item3"
-
- Rectangle {
- y: 160; height: 120; width: 420
-
- color: "transparent"
- border.width: 5; border.color: secondScope.activeFocus?"blue":"black"
-
- Rectangle {
- id: item4; objectName: "item4"
- x: 10; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: activeFocus?"blue":"black"
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item5; objectName: "item5"
- x: 310; y: 10; width: 100; height: 100; color: "green"
- border.width: 5; border.color: activeFocus?"blue":"black"
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
- }
- }
- }
- Keys.onDigit4Pressed: item4.focus = true
- Keys.onDigit5Pressed: item5.forceActiveFocus()
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/qtBug13380.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/qtBug13380.qml
deleted file mode 100644
index 1784202e77..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/qtBug13380.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- width: 400; height: 400
-
- property bool showRect: false
- onShowRectChanged: if (showRect) rect.visible = true
- property bool noFocus: !fs2.activeFocus
-
- FocusScope {
- id: fs1
- focus: true
- }
- Rectangle {
- id: rect
- visible: false
- FocusScope {
- id: fs2
- Rectangle {
- focus: true
- }
- }
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/signalEmission.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/signalEmission.qml
deleted file mode 100644
index 5850791704..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/signalEmission.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- width: 200
- height: 200
-
- FocusScope {
- focus: true
- Rectangle {
- objectName: "item1"
- color: "blue"
- onFocusChanged: focus ? color = "red" : color = "blue"
- }
- Rectangle {
- objectName: "item2"
- color: "blue"
- onFocusChanged: focus ? color = "red" : color = "blue"
- }
- }
-
- FocusScope {
- Rectangle {
- objectName: "item3"
- color: "blue"
- onFocusChanged: focus ? color = "red" : color = "blue"
- }
- Rectangle {
- objectName: "item4"
- color: "blue"
- onFocusChanged: focus ? color = "red" : color = "blue"
- }
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/test.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/test.qml
deleted file mode 100644
index 5983c19015..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/test.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onDigit9Pressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
- objectName: "item0"
- focus: true
-
- Keys.onDigit9Pressed: console.log("Error - FocusScope")
-
- Rectangle {
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.activeFocus?"blue":"black"
-
- Rectangle {
- id: item1; objectName: "item1"
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
- Keys.onDigit9Pressed: console.debug("Top Left");
- KeyNavigation.right: item2
- focus: true
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item2; objectName: "item2"
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onDigit9Pressed: console.log("Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
- }
- KeyNavigation.down: item3
- }
-
- Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box indicates active focus\nUse arrow keys to navigate\nPress \"9\" to print currently focused item" }
-
- Rectangle {
- id: item3; objectName: "item3"
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
-
- Keys.onDigit9Pressed: console.log("Bottom Left");
- KeyNavigation.up: myScope
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/test2.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/test2.qml
deleted file mode 100644
index 8c0b3b4267..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/test2.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Text { text: "All five rectangles should be red" }
-
- FocusScope {
- y: 100
- focus: true; objectName: "item1"
- Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true; objectName: "item2"
- Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true; objectName: "item3"
- Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true; objectName: "item4"
- Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true; objectName: "item5"
- Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
- }
- }
- }
- }
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/test3.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/test3.qml
deleted file mode 100644
index 2e025cb6cc..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/test3.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- ListModel {
- id: model
- ListElement { name: "1" }
- ListElement { name: "2" }
- ListElement { name: "3" }
- ListElement { name: "4" }
- ListElement { name: "5" }
- ListElement { name: "6" }
- ListElement { name: "7" }
- ListElement { name: "8" }
- ListElement { name: "9" }
- }
-
- Component {
- id: verticalDelegate
- FocusScope {
- id: root
- width: 50; height: 50;
- Keys.onDigit9Pressed: console.log("Error - " + name)
- Rectangle {
- focus: true
- Keys.onDigit9Pressed: console.log(name)
- width: 50; height: 50;
- color: root.ListView.isCurrentItem?"red":"green"
- Text { text: name; anchors.centerIn: parent }
- }
- }
- }
-
- ListView {
- width: 800; height: 50; orientation: "Horizontal"
- focus: true
- model: model
- delegate: verticalDelegate
- preferredHighlightBegin: 100
- preferredHighlightEnd: 100
- highlightRangeMode: "StrictlyEnforceRange"
- }
-
-
- Text {
- y: 100; x: 50
- text: "Currently selected element should be red\nPressing \"9\" should print the number of the currently selected item\nBe sure to scroll all the way to the right, pause, and then all the way to the left."
- }
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/test4.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/test4.qml
deleted file mode 100644
index 7192dee6db..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/test4.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onDigit9Pressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
-
- Keys.onDigit9Pressed: console.log("Error - FocusScope")
-
- Rectangle {
- objectName: "item0"
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.activeFocus?"blue":"black"
-
- Rectangle {
- id: item1; objectName: "item1"
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
- Keys.onDigit9Pressed: console.log("Error - Top Left");
- KeyNavigation.right: item2
- focus: true
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item2; objectName: "item2"
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onDigit9Pressed: console.log("Error - Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
- }
- KeyNavigation.down: item3
- }
-
- Text { x:100; y:170; text: "There should be no blue borders, or red squares.\nPressing \"9\" should do nothing.\nArrow keys should have no effect." }
-
- Rectangle {
- id: item3; objectName: "item3"
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
-
- Keys.onDigit9Pressed: console.log("Error - Bottom Left");
- KeyNavigation.up: myScope
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
-
-}
diff --git a/tests/auto/qtquick1/qdeclarativefocusscope/data/test5.qml b/tests/auto/qtquick1/qdeclarativefocusscope/data/test5.qml
deleted file mode 100644
index 01dada5d37..0000000000
--- a/tests/auto/qtquick1/qdeclarativefocusscope/data/test5.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-import QtQuick 1.0
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onReturnPressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
- objectName: "item0"
- focus: true
-
- Keys.onReturnPressed: console.log("Error - FocusScope")
-
- Rectangle {
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.activeFocus?"blue":"black"
-
- Rectangle {
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: item1.activeFocus?"blue":"black"
- }
-
- TextEdit {
- id: item1; objectName: "item1"
- x: 20; y: 20
- width: 90; height: 90
- color: "white"
- font.pixelSize: 20
- Keys.onReturnPressed: console.log("Top Left");
- KeyNavigation.right: item2
- focus: true
- wrapMode: TextEdit.WordWrap
- text: "Box 1"
- }
-
- Rectangle {
- id: item2; objectName: "item2"
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: activeFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onReturnPressed: console.log("Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.activeFocus?"red":"transparent"
- }
- }
- }
- KeyNavigation.down: item3
- }
-
- Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box or flashing cursor indicates active focus\nUse arrow keys to navigate\nPress Ctrl-Return to print currently focused item" }
-
- Rectangle {
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: item3.activeFocus?"blue":"black"
- }
-
- TextEdit {
- id: item3; objectName: "item3"
- x: 20; y: 310
- width: 90; height: 90
- color: "white"
- font.pixelSize: 20
- text: "Box 3"
-
- Keys.onReturnPressed: console.log("Bottom Left");
- KeyNavigation.up: myScope
- wrapMode: TextEdit.WordWrap
- }
-}