@@ -9,32 +9,54 @@ Loader{
9
9
// Qt.quit()
10
10
}
11
11
12
- function testScreenshot (tag , next ){
12
+ // function testScreenshot(tag, next){
13
+ // var path = source.toString()
14
+ // .replace(".qml", "")
15
+ // .replace("file://", "")
16
+ // if(tag)
17
+ // path = path + "-" + tag
18
+ // console.log("grab" + path + ".png")
19
+ // shorty.shootFull(path+ ".png")
20
+ // next()
21
+ // }
22
+ // function testDone(){
23
+ // Qt.quit()
24
+ // }
25
+ // function testYield()
26
+ // {
27
+ // }
28
+ onLoaded: {
29
+ console .log (" load" )
30
+ item .start ()
31
+ for (var i in item .data ){
32
+ var child = item .data [i]
33
+ if (child .toString ().indexOf (" Describe" ) === 0 ){
34
+ child .compareRender = function (tag , callback ){
35
+ var path = source .toString ()
36
+ .replace (" .qml" , " " )
37
+ .replace (" file://" , " " )
38
+ if (tag)
39
+ path = path + " -" + tag
40
+ console .log (" grab" + path + " .png" )
41
+ shorty .shootFull (path+ " .png" )
42
+
43
+ callback (true ) // doesnt compare in qt only generate
44
+ }
45
+ child .start ()
46
+ }
47
+ }
48
+
49
+ }
50
+ function compareRender2 (tag , callback ){
13
51
var path = source .toString ()
14
52
.replace (" .qml" , " " )
15
53
.replace (" file://" , " " )
16
54
if (tag)
17
55
path = path + " -" + tag
18
56
console .log (" grab" + path + " .png" )
19
57
shorty .shootFull (path+ " .png" )
20
- next ()
21
- }
22
- function testDone (){
23
- Qt .quit ()
24
- }
25
- function testYield ()
26
- {
27
- }
28
- onLoaded: {
29
- console .log (" load" )
30
- timer .start ()
31
- }
32
58
33
- Timer{
34
- id: timer
35
- interval: 10
36
- onTriggered: {
37
- item .test ()
38
- }
59
+ callback (true ) // doesnt compare in qt only generate
39
60
}
61
+
40
62
}
0 commit comments