Squish: Use example from Qt 5 in tst_qml_outline

Task-number: QTCREATORBUG-15469
Change-Id: Ib719e31e53f23a51c4971a53eaa870f4833ef748
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2016-07-13 16:37:00 +02:00
parent 392693352c
commit a7933e9372
5 changed files with 175 additions and 42 deletions
@@ -27,19 +27,20 @@ source("../../shared/qtcreator.py")
qmlEditor = ":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"
outline = ":Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView"
treebase = "keyinteraction.Resources.keyinteraction\\.qrc./keyinteraction.focus."
def main():
sourceExample = os.path.abspath(os.path.join(sdkPath, "Examples", "4.7", "declarative",
"keyinteraction", "focus"))
proFile = "focus.pro"
sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT),
"quick", "keyinteraction")
proFile = "keyinteraction.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
templateDir = prepareTemplate(sourceExample)
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_480_DEFAULT)
qmlFiles = ["focus.QML.qml.focus\\.qml", "focus.QML.qml.Core.ListMenu\\.qml"]
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_531_DEFAULT)
qmlFiles = [treebase + "focus\\.qml", treebase + "Core.ListMenu\\.qml"]
checkOutlineFor(qmlFiles)
testModify()
invokeMenuItem("File", "Save All")
@@ -73,7 +74,7 @@ def processChildren(model, startIndex, level):
def testModify():
global qmlEditor
if not openDocument("focus.QML.qml.focus\\.qml"):
if not openDocument(treebase + "focus\\.qml"):
test.fatal("Failed to open file focus.qml")
return
test.log("Testing whether modifications show up inside outline.")
@@ -2,7 +2,7 @@
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"height" "1" "640"
"color" "1" """#3E606F"""
"Text" "1" ""
"id" "2" "addedText"
@@ -15,17 +15,25 @@
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"TabMenu" "2" ""
"id" "3" "tabMenu"
"y" "3" "160"
"width" "3" "parent.width"
"height" "3" "160"
"focus" "3" "true"
"activeFocusOnTab" "3" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "640"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
@@ -33,13 +41,38 @@
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"name" "4" """showTabViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"y" "5" "320"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "640"
"State" "3" ""
"name" "4" """showGridViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "480"
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "320"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480 640
6 color 1 "#3E606F"
7 Text 1
8 id 2 addedText
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 TabMenu 2
19 id 3 tabMenu
20 y 3 160
21 width 3 parent.width
22 height 3 160
23 focus 3 true
24 activeFocusOnTab 3 true
25 GridMenu 2
26 id 3 gridMenu
width 3 parent.width
height 3 320
focus 3 true
interactive 3 parent.activeFocus
ListMenu 2
id 3 listMenu
27 y 3 320
28 width 3 parent.width
29 height 3 320
30 activeFocusOnTab 3 true
31 ListMenu 2
32 id 3 listMenu
33 y 3 640
34 width 3 parent.width
35 height 3 320
36 activeFocusOnTab 3 true
37 Rectangle 2
38 id 3 shade
39 anchors.fill 3 parent
41 opacity 3 0
42 states 2
43 State 3
44 name 4 "showListViews" "showTabViews"
45 PropertyChanges 4
46 target 5 tabMenu
47 y 5 160
48 PropertyChanges 4
49 target 5 gridMenu
50 y 5 -160 320
51 PropertyChanges 4
52 target 5 listMenu
53 y 5 640
54 State 3
55 name 4 "showGridViews"
56 PropertyChanges 4
57 target 5 tabMenu
58 y 5 0
59 PropertyChanges 4
60 target 5 gridMenu
61 y 5 160
62 PropertyChanges 4
63 target 5 listMenu
64 y 5 480
65 State 3
66 name 4 "showListViews"
67 PropertyChanges 4
68 target 5 tabMenu
69 y 5 -160
70 PropertyChanges 4
71 target 5 gridMenu
72 y 5 0
73 PropertyChanges 4
74 target 5 listMenu
75 y 5 320
76 transitions 2
77 Transition 3
78 NumberAnimation 4
@@ -2,7 +2,7 @@
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"height" "1" "640"
"color" "1" """white"""
"Text" "1" ""
"id" "2" "addedText"
@@ -15,17 +15,25 @@
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"TabMenu" "2" ""
"id" "3" "tabMenu"
"y" "3" "160"
"width" "3" "parent.width"
"height" "3" "160"
"focus" "3" "true"
"activeFocusOnTab" "3" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "640"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
@@ -33,13 +41,38 @@
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"name" "4" """showTabViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"y" "5" "320"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "640"
"State" "3" ""
"name" "4" """showGridViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "480"
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "320"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480 640
6 color 1 "white"
7 Text 1
8 id 2 addedText
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 TabMenu 2
19 id 3 tabMenu
20 y 3 160
21 width 3 parent.width
22 height 3 160
23 focus 3 true
24 activeFocusOnTab 3 true
25 GridMenu 2
26 id 3 gridMenu
width 3 parent.width
height 3 320
focus 3 true
interactive 3 parent.activeFocus
ListMenu 2
id 3 listMenu
27 y 3 320
28 width 3 parent.width
29 height 3 320
30 activeFocusOnTab 3 true
31 ListMenu 2
32 id 3 listMenu
33 y 3 640
34 width 3 parent.width
35 height 3 320
36 activeFocusOnTab 3 true
37 Rectangle 2
38 id 3 shade
39 anchors.fill 3 parent
41 opacity 3 0
42 states 2
43 State 3
44 name 4 "showListViews" "showTabViews"
45 PropertyChanges 4
46 target 5 tabMenu
47 y 5 160
48 PropertyChanges 4
49 target 5 gridMenu
50 y 5 -160 320
51 PropertyChanges 4
52 target 5 listMenu
53 y 5 640
54 State 3
55 name 4 "showGridViews"
56 PropertyChanges 4
57 target 5 tabMenu
58 y 5 0
59 PropertyChanges 4
60 target 5 gridMenu
61 y 5 160
62 PropertyChanges 4
63 target 5 listMenu
64 y 5 480
65 State 3
66 name 4 "showListViews"
67 PropertyChanges 4
68 target 5 tabMenu
69 y 5 -160
70 PropertyChanges 4
71 target 5 gridMenu
72 y 5 0
73 PropertyChanges 4
74 target 5 listMenu
75 y 5 320
76 transitions 2
77 Transition 3
78 NumberAnimation 4
@@ -5,7 +5,7 @@
"clicked" "1" ""
"clicked()" "1" ""
"width" "1" "800"
"height" "1" "480"
"height" "1" "640"
"color" "1" """white"""
"Text" "1" ""
"id" "2" "addedText"
@@ -18,17 +18,25 @@
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"TabMenu" "2" ""
"id" "3" "tabMenu"
"y" "3" "160"
"width" "3" "parent.width"
"height" "3" "160"
"focus" "3" "true"
"activeFocusOnTab" "3" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "640"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
@@ -36,13 +44,38 @@
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"name" "4" """showTabViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"y" "5" "320"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "640"
"State" "3" ""
"name" "4" """showGridViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "480"
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "320"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
1 element nestinglevel value
5 clicked 1
6 clicked() 1
7 width 1 800
8 height 1 480 640
9 color 1 "white"
10 Text 1
11 id 2 addedText
18 width 2 parent.width
19 height 2 parent.height
20 focus 2 true
21 TabMenu 2
22 id 3 tabMenu
23 y 3 160
24 width 3 parent.width
25 height 3 160
26 focus 3 true
27 activeFocusOnTab 3 true
28 GridMenu 2
29 id 3 gridMenu
width 3 parent.width
height 3 320
focus 3 true
interactive 3 parent.activeFocus
ListMenu 2
id 3 listMenu
30 y 3 320
31 width 3 parent.width
32 height 3 320
33 activeFocusOnTab 3 true
34 ListMenu 2
35 id 3 listMenu
36 y 3 640
37 width 3 parent.width
38 height 3 320
39 activeFocusOnTab 3 true
40 Rectangle 2
41 id 3 shade
42 anchors.fill 3 parent
44 opacity 3 0
45 states 2
46 State 3
47 name 4 "showListViews" "showTabViews"
48 PropertyChanges 4
49 target 5 tabMenu
50 y 5 160
51 PropertyChanges 4
52 target 5 gridMenu
53 y 5 -160 320
54 PropertyChanges 4
55 target 5 listMenu
56 y 5 640
57 State 3
58 name 4 "showGridViews"
59 PropertyChanges 4
60 target 5 tabMenu
61 y 5 0
62 PropertyChanges 4
63 target 5 gridMenu
64 y 5 160
65 PropertyChanges 4
66 target 5 listMenu
67 y 5 480
68 State 3
69 name 4 "showListViews"
70 PropertyChanges 4
71 target 5 tabMenu
72 y 5 -160
73 PropertyChanges 4
74 target 5 gridMenu
75 y 5 0
76 PropertyChanges 4
77 target 5 listMenu
78 y 5 320
79 transitions 2
80 Transition 3
81 NumberAnimation 4
@@ -2,24 +2,32 @@
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"height" "1" "640"
"color" "1" """#3E606F"""
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"TabMenu" "2" ""
"id" "3" "tabMenu"
"y" "3" "160"
"width" "3" "parent.width"
"height" "3" "160"
"focus" "3" "true"
"activeFocusOnTab" "3" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "640"
"width" "3" "parent.width"
"height" "3" "320"
"activeFocusOnTab" "3" "true"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
@@ -27,13 +35,38 @@
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"name" "4" """showTabViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"y" "5" "320"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "640"
"State" "3" ""
"name" "4" """showGridViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "480"
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "tabMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "0"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "320"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480 640
6 color 1 "#3E606F"
7 FocusScope 1
8 id 2 mainView
9 width 2 parent.width
10 height 2 parent.height
11 focus 2 true
12 TabMenu 2
13 id 3 tabMenu
14 y 3 160
15 width 3 parent.width
16 height 3 160
17 focus 3 true
18 activeFocusOnTab 3 true
19 GridMenu 2
20 id 3 gridMenu
width 3 parent.width
height 3 320
focus 3 true
interactive 3 parent.activeFocus
ListMenu 2
id 3 listMenu
21 y 3 320
22 width 3 parent.width
23 height 3 320
24 activeFocusOnTab 3 true
25 ListMenu 2
26 id 3 listMenu
27 y 3 640
28 width 3 parent.width
29 height 3 320
30 activeFocusOnTab 3 true
31 Rectangle 2
32 id 3 shade
33 anchors.fill 3 parent
35 opacity 3 0
36 states 2
37 State 3
38 name 4 "showListViews" "showTabViews"
39 PropertyChanges 4
40 target 5 tabMenu
41 y 5 160
42 PropertyChanges 4
43 target 5 gridMenu
44 y 5 -160 320
45 PropertyChanges 4
46 target 5 listMenu
47 y 5 640
48 State 3
49 name 4 "showGridViews"
50 PropertyChanges 4
51 target 5 tabMenu
52 y 5 0
53 PropertyChanges 4
54 target 5 gridMenu
55 y 5 160
56 PropertyChanges 4
57 target 5 listMenu
58 y 5 480
59 State 3
60 name 4 "showListViews"
61 PropertyChanges 4
62 target 5 tabMenu
63 y 5 -160
64 PropertyChanges 4
65 target 5 gridMenu
66 y 5 0
67 PropertyChanges 4
68 target 5 listMenu
69 y 5 320
70 transitions 2
71 Transition 3
72 NumberAnimation 4