From cbffed3af04495f7bd28a054a1c04ee33ca43a80 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 21 May 2009 11:50:11 +1000 Subject: Convert visual autotests. --- .../declarative/visual/ListView/basic1/basic1.qml | 25 +++ .../declarative/visual/ListView/basic1/basic1.xml | 19 --- .../declarative/visual/ListView/basic2/basic2.qml | 29 ++++ .../declarative/visual/ListView/basic2/basic2.xml | 20 --- .../declarative/visual/ListView/basic3/basic3.qml | 27 +++ .../declarative/visual/ListView/basic3/basic3.xml | 18 -- .../declarative/visual/ListView/basic4/basic4.qml | 31 ++++ .../declarative/visual/ListView/basic4/basic4.xml | 19 --- .../visual/bindinganimation/bindinganimation.qml | 40 +++++ .../visual/bindinganimation/bindinganimation.xml | 19 --- .../auto/declarative/visual/bindinganimation/test | 2 +- .../visual/colorAnimation/colorAnimation.qml | 40 +++++ .../visual/colorAnimation/colorAnimation.xml | 18 -- tests/auto/declarative/visual/easing/easing.qml | 186 +++++++++++++++++++++ tests/auto/declarative/visual/easing/easing.xml | 70 -------- tests/auto/declarative/visual/flickable/Day.qml | 32 +++- .../declarative/visual/flickable/flickable.qml | 53 ++++++ .../declarative/visual/flickable/flickable.xml | 43 ----- .../visual/pauseAnimation/pauseAnimation.qml | 28 ++++ .../visual/pauseAnimation/pauseAnimation.xml | 13 -- .../declarative/visual/qfxtext/elide/elide.qml | 33 ++++ .../declarative/visual/qfxtext/elide/elide.xml | 6 - .../declarative/visual/repeater/basic1/basic1.qml | 26 +++ .../declarative/visual/repeater/basic1/basic1.xml | 21 --- .../declarative/visual/repeater/basic2/basic2.qml | 30 ++++ .../declarative/visual/repeater/basic2/basic2.xml | 22 --- .../declarative/visual/repeater/basic3/basic3.qml | 28 ++++ .../declarative/visual/repeater/basic3/basic3.xml | 19 --- .../declarative/visual/repeater/basic4/basic4.qml | 32 ++++ .../declarative/visual/repeater/basic4/basic4.xml | 18 -- tests/auto/declarative/visual/runtests.sh | 1 + 31 files changed, 635 insertions(+), 333 deletions(-) create mode 100644 tests/auto/declarative/visual/ListView/basic1/basic1.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic1/basic1.xml create mode 100644 tests/auto/declarative/visual/ListView/basic2/basic2.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic2/basic2.xml create mode 100644 tests/auto/declarative/visual/ListView/basic3/basic3.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic3/basic3.xml create mode 100644 tests/auto/declarative/visual/ListView/basic4/basic4.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic4/basic4.xml create mode 100644 tests/auto/declarative/visual/bindinganimation/bindinganimation.qml delete mode 100644 tests/auto/declarative/visual/bindinganimation/bindinganimation.xml create mode 100644 tests/auto/declarative/visual/colorAnimation/colorAnimation.qml delete mode 100644 tests/auto/declarative/visual/colorAnimation/colorAnimation.xml create mode 100644 tests/auto/declarative/visual/easing/easing.qml delete mode 100644 tests/auto/declarative/visual/easing/easing.xml create mode 100644 tests/auto/declarative/visual/flickable/flickable.qml delete mode 100644 tests/auto/declarative/visual/flickable/flickable.xml create mode 100644 tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml delete mode 100644 tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml create mode 100644 tests/auto/declarative/visual/qfxtext/elide/elide.qml delete mode 100644 tests/auto/declarative/visual/qfxtext/elide/elide.xml create mode 100644 tests/auto/declarative/visual/repeater/basic1/basic1.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic1/basic1.xml create mode 100644 tests/auto/declarative/visual/repeater/basic2/basic2.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic2/basic2.xml create mode 100644 tests/auto/declarative/visual/repeater/basic3/basic3.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic3/basic3.xml create mode 100644 tests/auto/declarative/visual/repeater/basic4/basic4.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic4/basic4.xml diff --git a/tests/auto/declarative/visual/ListView/basic1/basic1.qml b/tests/auto/declarative/visual/ListView/basic1/basic1.qml new file mode 100644 index 0000000..605457b --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic1/basic1.qml @@ -0,0 +1,25 @@ +Rect { + color: "blue" + width: 300 + height: 200 + id: Page + ListView { + anchors.fill: parent + delegate: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + model: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic1/basic1.xml b/tests/auto/declarative/visual/ListView/basic1/basic1.xml deleted file mode 100644 index 5038c0a..0000000 --- a/tests/auto/declarative/visual/ListView/basic1/basic1.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - January - - - February - - - - - diff --git a/tests/auto/declarative/visual/ListView/basic2/basic2.qml b/tests/auto/declarative/visual/ListView/basic2/basic2.qml new file mode 100644 index 0000000..e5996cf --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic2/basic2.qml @@ -0,0 +1,29 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + ListView { + anchors.fill: parent + delegate: Delegate + model: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic2/basic2.xml b/tests/auto/declarative/visual/ListView/basic2/basic2.xml deleted file mode 100644 index 5e139fe..0000000 --- a/tests/auto/declarative/visual/ListView/basic2/basic2.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - January - - - February - - - - - diff --git a/tests/auto/declarative/visual/ListView/basic3/basic3.qml b/tests/auto/declarative/visual/ListView/basic3/basic3.qml new file mode 100644 index 0000000..98aa5fb --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic3/basic3.qml @@ -0,0 +1,27 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + ListModel { + id: Model + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + ListView { + anchors.fill: parent + model: Model + delegate: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic3/basic3.xml b/tests/auto/declarative/visual/ListView/basic3/basic3.xml deleted file mode 100644 index a587b82..0000000 --- a/tests/auto/declarative/visual/ListView/basic3/basic3.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - January - - - February - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/ListView/basic4/basic4.qml b/tests/auto/declarative/visual/ListView/basic4/basic4.qml new file mode 100644 index 0000000..9e5229a --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic4/basic4.qml @@ -0,0 +1,31 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + ListModel { + id: Model + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + ListView { + anchors.fill: parent + model: Model + delegate: Delegate + } +} diff --git a/tests/auto/declarative/visual/ListView/basic4/basic4.xml b/tests/auto/declarative/visual/ListView/basic4/basic4.xml deleted file mode 100644 index 4b9201c..0000000 --- a/tests/auto/declarative/visual/ListView/basic4/basic4.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - January - - - February - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml new file mode 100644 index 0000000..56878dc --- /dev/null +++ b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml @@ -0,0 +1,40 @@ +Rect { + color: "blue" + width: 320 + height: 240 + id: Page + Rect { + id: MyRect + width: 100 + height: 100 + color: "red" + x: 10 + } + states: [ + State { + name: "hello" + SetProperty { + target: MyRect + property: "x" + binding: 100 + } + SetProperty { + target: MyMouseRegion + property: "onClicked" + value: "Page.currentState = ''" + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "x" + } + } + ] + MouseRegion { + id: MyMouseRegion + anchors.fill: parent + onClicked: { Page.currentState= 'hello' } + } +} diff --git a/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml b/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml deleted file mode 100644 index 30b0b6a..0000000 --- a/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/bindinganimation/test b/tests/auto/declarative/visual/bindinganimation/test index 964c489..bb59333 100644 --- a/tests/auto/declarative/visual/bindinganimation/test +++ b/tests/auto/declarative/visual/bindinganimation/test @@ -1 +1 @@ -bindinganimation.xml +bindinganimation.qml diff --git a/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml new file mode 100644 index 0000000..69460c5 --- /dev/null +++ b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml @@ -0,0 +1,40 @@ +Rect { + id: mainrect + state: "first" + states: [ + State { + name: "first" + SetProperty { + target: mainrect + property: "color" + value: "red" + } + }, + State { + name: "second" + SetProperty { + target: mainrect + property: "color" + value: "blue" + } + } + ] + transitions: [ + Transition { + fromState: "first" + toState: "second" + reversible: true + SequentialAnimation { + ColorAnimation { + duration: 2000 + target: mainrect + property: "color" + } + } + } + ] + MouseRegion { + anchors.fill: parent + onClicked: { mainrect.state = 'second' } + } +} diff --git a/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml b/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml deleted file mode 100644 index 39d08be..0000000 --- a/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/easing/easing.qml b/tests/auto/declarative/visual/easing/easing.qml new file mode 100644 index 0000000..4a0ed14 --- /dev/null +++ b/tests/auto/declarative/visual/easing/easing.qml @@ -0,0 +1,186 @@ +Rect { + id: item + width: 600 + height: layout.height + color: "white" + resources: [ + ListModel { + id: easingtypes + ListElement { + type: "easeNone" + } + ListElement { + type: "easeInQuad" + } + ListElement { + type: "easeOutQuad" + } + ListElement { + type: "easeInOutQuad" + } + ListElement { + type: "easeOutInQuad" + } + ListElement { + type: "easeInCubic" + } + ListElement { + type: "easeOutCubic" + } + ListElement { + type: "easeInOutCubic" + } + ListElement { + type: "easeOutInCubic" + } + ListElement { + type: "easeInQuart" + } + ListElement { + type: "easeOutQuart" + } + ListElement { + type: "easeInOutQuart" + } + ListElement { + type: "easeOutInQuart" + } + ListElement { + type: "easeInQuint" + } + ListElement { + type: "easeOutQuint" + } + ListElement { + type: "easeInOutQuint" + } + ListElement { + type: "easeOutInQuint" + } + ListElement { + type: "easeInSine" + } + ListElement { + type: "easeOutSine" + } + ListElement { + type: "easeInOutSine" + } + ListElement { + type: "easeOutInSine" + } + ListElement { + type: "easeInExpo" + } + ListElement { + type: "easeOutExpo" + } + ListElement { + type: "easeInOutExpo" + } + ListElement { + type: "easeOutInExpo" + } + ListElement { + type: "easeInCirc" + } + ListElement { + type: "easeOutCirc" + } + ListElement { + type: "easeInOutCirc" + } + ListElement { + type: "easeOutInCirc" + } + ListElement { + type: "easeInElastic" + } + ListElement { + type: "easeOutElastic" + } + ListElement { + type: "easeInOutElastic" + } + ListElement { + type: "easeOutInElastic" + } + ListElement { + type: "easeInBack" + } + ListElement { + type: "easeOutBack" + } + ListElement { + type: "easeInOutBack" + } + ListElement { + type: "easeOutInBack" + } + ListElement { + type: "easeOutBounce" + } + ListElement { + type: "easeInBounce" + } + ListElement { + type: "easeInOutBounce" + } + ListElement { + type: "easeOutInBounce" + } + } + ] + VerticalLayout { + id: layout + anchors.left: item.left + anchors.right: item.right + Repeater { + dataSource: easingtypes + Component { + Text { + id: text + text: type + height: 18 + font.italic: true + color: "black" + states: [ + State { + name: "from" + when: !mouse.pressed + SetProperty { + target: text + property: "x" + value: 0 + } + }, + State { + name: "to" + when: mouse.pressed + SetProperty { + target: text + property: "x" + value: item.width-100 + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "to" + reversible: true + NumericAnimation { + properties: "x" + easing: type + } + } + ] + } + } + } + } + MouseRegion { + id: mouse + anchors.fill: layout + } +} diff --git a/tests/auto/declarative/visual/easing/easing.xml b/tests/auto/declarative/visual/easing/easing.xml deleted file mode 100644 index 01a7d6c..0000000 --- a/tests/auto/declarative/visual/easing/easing.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - easeNone - easeInQuad - easeOutQuad - easeInOutQuad - easeOutInQuad - easeInCubic - easeOutCubic - easeInOutCubic - easeOutInCubic - easeInQuart - easeOutQuart - easeInOutQuart - easeOutInQuart - easeInQuint - easeOutQuint - easeInOutQuint - easeOutInQuint - easeInSine - easeOutSine - easeInOutSine - easeOutInSine - easeInExpo - easeOutExpo - easeInOutExpo - easeOutInExpo - easeInCirc - easeOutCirc - easeInOutCirc - easeOutInCirc - easeInElastic - easeOutElastic - easeInOutElastic - easeOutInElastic - easeInBack - easeOutBack - easeInOutBack - easeOutInBack - easeOutBounce - easeInBounce - easeInOutBounce - easeOutInBounce - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/flickable/Day.qml b/tests/auto/declarative/visual/flickable/Day.qml index 0765e2f..63fbc78 100644 --- a/tests/auto/declarative/visual/flickable/Day.qml +++ b/tests/auto/declarative/visual/flickable/Day.qml @@ -1,8 +1,26 @@ - - - - +Rect { + property string day - - - + width: 400 + height: 500 + radius: 7 + pen.color: "black" + id: Page + Image { + x: 10 + y: 10 + source: "cork.jpg" + opaque: true + } + Text { + x: 20 + y: 20 + height: 40 + font.size: 14 + font.bold: true + width: 370 + text: day + style: "Outline" + styleColor: "#dedede" + } +} diff --git a/tests/auto/declarative/visual/flickable/flickable.qml b/tests/auto/declarative/visual/flickable/flickable.qml new file mode 100644 index 0000000..5946c40 --- /dev/null +++ b/tests/auto/declarative/visual/flickable/flickable.qml @@ -0,0 +1,53 @@ +Rect { + color: "lightSteelBlue" + width: 800 + height: 500 + ListModel { + id: List + ListElement { + name: "Sunday" + dayColor: "#808080" + } + ListElement { + name: "Monday" + dayColor: "blue" + } + ListElement { + name: "Tuesday" + dayColor: "yellow" + } + ListElement { + name: "Wednesday" + dayColor: "purple" + } + ListElement { + name: "Thursday" + dayColor: "blue" + } + ListElement { + name: "Friday" + dayColor: "green" + } + ListElement { + name: "Saturday" + dayColor: "orange" + } + } + Flickable { + id: Flick + anchors.fill: parent + viewportWidth: Lay.width + HorizontalLayout { + id: Lay + Repeater { + dataSource: List + Component { + Day { + day: name + color: dayColor + } + } + } + } + } +} diff --git a/tests/auto/declarative/visual/flickable/flickable.xml b/tests/auto/declarative/visual/flickable/flickable.xml deleted file mode 100644 index 78bf42f..0000000 --- a/tests/auto/declarative/visual/flickable/flickable.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - Sunday - #808080 - - - Monday - blue - - - Tuesday - yellow - - - Wednesday - purple - - - Thursday - blue - - - Friday - green - - - Saturday - orange - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml new file mode 100644 index 0000000..5c00f58 --- /dev/null +++ b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml @@ -0,0 +1,28 @@ +Rect { + id: rect + width: 120 + height: 200 + color: "white" + Image { + id: img + source: "pics/qtlogo.png" + x: 60-width/2 + y: 200-height + y: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: 0; duration: 500 + easing: "easeInOutQuad" + } + NumericAnimation { + to: 200-img.height + easing: "easeOutBounce" + duration: 2000 + } + PauseAnimation { + duration: 1000 + } + } + } +} diff --git a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml deleted file mode 100644 index bb411e2..0000000 --- a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/tests/auto/declarative/visual/qfxtext/elide/elide.qml b/tests/auto/declarative/visual/qfxtext/elide/elide.qml new file mode 100644 index 0000000..23e6885 --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/elide.qml @@ -0,0 +1,33 @@ +Rect { + width: contents.width + height: contents.height + VerticalLayout { + width: 80 + height: Text.height*4 + Text { + elide: "ElideLeft" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + id: Text + } + Text { + elide: "ElideMiddle" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + Text { + elide: "ElideRight" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + Text { + elide: "ElideNone" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + } +} diff --git a/tests/auto/declarative/visual/qfxtext/elide/elide.xml b/tests/auto/declarative/visual/qfxtext/elide/elide.xml deleted file mode 100644 index 398da82..0000000 --- a/tests/auto/declarative/visual/qfxtext/elide/elide.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/tests/auto/declarative/visual/repeater/basic1/basic1.qml b/tests/auto/declarative/visual/repeater/basic1/basic1.qml new file mode 100644 index 0000000..3c66508 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic1/basic1.qml @@ -0,0 +1,26 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + HorizontalLayout { + Repeater { + component: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + dataSource: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic1/basic1.xml b/tests/auto/declarative/visual/repeater/basic1/basic1.xml deleted file mode 100644 index def809f..0000000 --- a/tests/auto/declarative/visual/repeater/basic1/basic1.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - January - - - February - - - - - - diff --git a/tests/auto/declarative/visual/repeater/basic2/basic2.qml b/tests/auto/declarative/visual/repeater/basic2/basic2.qml new file mode 100644 index 0000000..1228be8 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic2/basic2.qml @@ -0,0 +1,30 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + HorizontalLayout { + Repeater { + component: Delegate + dataSource: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic2/basic2.xml b/tests/auto/declarative/visual/repeater/basic2/basic2.xml deleted file mode 100644 index b16fbfe..0000000 --- a/tests/auto/declarative/visual/repeater/basic2/basic2.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - January - - - February - - - - - - diff --git a/tests/auto/declarative/visual/repeater/basic3/basic3.qml b/tests/auto/declarative/visual/repeater/basic3/basic3.qml new file mode 100644 index 0000000..7b8b9ef --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic3/basic3.qml @@ -0,0 +1,28 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + ListModel { + id: DataSource + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + HorizontalLayout { + Repeater { + dataSource: DataSource + component: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic3/basic3.xml b/tests/auto/declarative/visual/repeater/basic3/basic3.xml deleted file mode 100644 index 1135f16..0000000 --- a/tests/auto/declarative/visual/repeater/basic3/basic3.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - January - - - February - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/repeater/basic4/basic4.qml b/tests/auto/declarative/visual/repeater/basic4/basic4.qml new file mode 100644 index 0000000..2111c24 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic4/basic4.qml @@ -0,0 +1,32 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + ListModel { + id: DataSource + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + HorizontalLayout { + Repeater { + dataSource: DataSource + component: Delegate + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic4/basic4.xml b/tests/auto/declarative/visual/repeater/basic4/basic4.xml deleted file mode 100644 index 53b8ff9..0000000 --- a/tests/auto/declarative/visual/repeater/basic4/basic4.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - January - - - February - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/runtests.sh b/tests/auto/declarative/visual/runtests.sh index f690381..4380884 100755 --- a/tests/auto/declarative/visual/runtests.sh +++ b/tests/auto/declarative/visual/runtests.sh @@ -1,2 +1,3 @@ #!/bin/sh +export QFX_USE_SIMPLECANVAS=1 for a in `cat tests`; do ./tst_visual -testdir $a; done -- cgit v0.12 From de01908d736b407e4d230e4360de5515d5fccf43 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 21 May 2009 11:50:49 +1000 Subject: Fix Contents --- src/declarative/fx/qfxitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 3cbcd6a..17fe36a 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -197,8 +197,10 @@ void QFxContents::setItem(QFxItem *item) const QList &children = _item->QSimpleCanvasItem::children(); for (int i = 0; i < children.count(); ++i) { const QSimpleCanvasItem *child = children.at(i); - connect(child, SIGNAL(bottomChanged()), this, SLOT(calcHeight())); - connect(child, SIGNAL(rightChanged()), this, SLOT(calcWidth())); + connect(child, SIGNAL(heightChanged()), this, SLOT(calcHeight())); + connect(child, SIGNAL(topChanged()), this, SLOT(calcHeight())); + connect(child, SIGNAL(widthChanged()), this, SLOT(calcWidth())); + connect(child, SIGNAL(leftChanged()), this, SLOT(calcWidth())); } calcHeight(); -- cgit v0.12 From 69b6c7f5bb5ca2cd2ddc625d49d5b39075dc833b Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 21 May 2009 11:51:18 +1000 Subject: Make bouncing work in follow example. --- examples/declarative/follow/follow.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/declarative/follow/follow.qml b/examples/declarative/follow/follow.qml index 5368e75..3258ea6 100644 --- a/examples/declarative/follow/follow.qml +++ b/examples/declarative/follow/follow.qml @@ -8,8 +8,12 @@ Rect { y: SequentialAnimation { running: true; repeat: true NumericAnimation { + to: 20; duration: 500 + easing: "easeInOutQuad" + } + NumericAnimation { to: 200; duration: 2000 - easing: "easeOutBounce(amplitude:180)" + easing: "easeOutBounce" } PauseAnimation { duration: 1000 } } -- cgit v0.12 From a3f784dd8c49a4edf1a22d68d435e29ceaf71c2d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 21 May 2009 15:32:35 +1000 Subject: Use QWidget as the TLW. It is basically impossible to make QMainWindow size the contents to the exact size wanted. Correct sizing is particularly important for visual test recording. --- tools/qmlviewer/qmlviewer.cpp | 35 +++++++++++++++++++++++++++-------- tools/qmlviewer/qmlviewer.h | 6 ++++-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 4b0a83a..0417539 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -124,7 +124,7 @@ void PreviewDeviceSkin::slotPopupMenu() QmlViewer::QmlViewer(QFxTestEngine::TestMode testMode, const QString &testDir, QWidget *parent, Qt::WindowFlags flags) - : QMainWindow(parent, flags), frame_stream(0), scaleSkin(true) + : QWidget(parent, flags), frame_stream(0), scaleSkin(true), mb(0) { testEngine = 0; devicemode = false; @@ -133,12 +133,12 @@ QmlViewer::QmlViewer(QFxTestEngine::TestMode testMode, const QString &testDir, Q record_autotime = 0; record_period = 20; - setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_NoSystemBackground); if (!(flags & Qt::FramelessWindowHint)) createMenu(menuBar(),0); canvas = new QFxView(this); + canvas->setAttribute(Qt::WA_OpaquePaintEvent); + canvas->setAttribute(Qt::WA_NoSystemBackground); canvas->setContentResizable(!skin || !scaleSkin); if(testMode != QFxTestEngine::NoTest) @@ -146,17 +146,31 @@ QmlViewer::QmlViewer(QFxTestEngine::TestMode testMode, const QString &testDir, Q QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize))); - setCentralWidget(canvas); + QVBoxLayout *layout = new QVBoxLayout; + layout->setMargin(0); + layout->setSpacing(0); + setLayout(layout); + if (mb) + layout->addWidget(mb); + layout->addWidget(canvas); +} + +QMenuBar *QmlViewer::menuBar() const +{ + if (!mb) + mb = new QMenuBar((QWidget*)this); + + return mb; } QSize QmlViewer::sizeHint() const { if (skin) - return QMainWindow::sizeHint(); + return QWidget::sizeHint(); else { // Kludge to force QMainWindow to be EXACTLY the right size for the canvas. QSize sh = canvas->sizeHint(); - sh.setHeight(sh.height()+menuBar()->sizeHint().height()+1); + sh.setHeight(sh.height()+menuBar()->sizeHint().height()); return sh; } } @@ -252,6 +266,8 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); fileMenu->addSeparator(); fileMenu->addAction(quitAction); + if (menu) + menu->setFixedHeight(menu->sizeHint().height()); } void QmlViewer::setScaleSkin() @@ -419,7 +435,9 @@ void QmlViewer::setSkin(const QString& skinDirectory) DeviceSkinParameters parameters; if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) { layout()->setEnabled(false); - setMenuBar(0); + //setMenuBar(0); + if (mb) + mb->hide(); if (!err.isEmpty()) qWarning() << err; skin = new PreviewDeviceSkin(parameters,this); @@ -436,6 +454,7 @@ void QmlViewer::setSkin(const QString& skinDirectory) menuBar()->clear(); canvas->setParent(this, Qt::SubWindow); createMenu(menuBar(),0); + mb->show(); setMinimumSize(QSize(0,0)); setMaximumSize(QSize(16777215,16777215)); canvas->setMinimumSize(QSize(0,0)); @@ -443,7 +462,7 @@ void QmlViewer::setSkin(const QString& skinDirectory) QRect g = geometry(); g.setSize(sizeHint()); setParent(0,windowFlags()); // recreate - canvas->move(0,menuBar()->sizeHint().height()+1); + canvas->move(0,menuBar()->sizeHint().height()); setGeometry(g); layout()->setEnabled(true); show(); diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h index 967af49..04d94cc 100644 --- a/tools/qmlviewer/qmlviewer.h +++ b/tools/qmlviewer/qmlviewer.h @@ -14,7 +14,7 @@ #ifndef QMLVIEWER_H #define QMLVIEWER_H -#include +#include #include #include #include @@ -26,7 +26,7 @@ class PreviewDeviceSkin; class QFxTestEngine; class QProcess; -class QmlViewer : public QMainWindow +class QmlViewer : public QWidget { Q_OBJECT public: @@ -45,6 +45,7 @@ public: void addLibraryPath(const QString& lib); QSize sizeHint() const; + QMenuBar *menuBar() const; public slots: void sceneResized(QSize size); @@ -87,6 +88,7 @@ private: QAction *recordAction; QString currentSkin; bool scaleSkin; + mutable QMenuBar *mb; QFxTestEngine *testEngine; }; -- cgit v0.12 From 479ea0cf60fe8a0e5fd0ac37b4602a495faa22fd Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 21 May 2009 16:59:17 +1000 Subject: Get visual auto testing working again. --- src/declarative/test/qfxtestengine.cpp | 54 ++- src/declarative/test/qfxtestobjects.cpp | 84 ++-- src/declarative/test/qfxtestobjects.h | 12 +- src/declarative/test/qfxtestview.cpp | 3 + tests/auto/declarative/listview/tst_listview.cpp | 14 +- .../visual/bindinganimation/bindinganimation.qml | 2 +- .../visual/bindinganimation/data/opengl/image0.png | Bin 817 -> 0 bytes .../bindinganimation/data/opengl/manifest-play.xml | 104 ---- .../bindinganimation/data/opengl/manifest.xml | 104 ---- .../visual/bindinganimation/data/raster/image0.png | Bin 0 -> 817 bytes .../bindinganimation/data/raster/manifest.qml | 86 ++++ .../visual/colorAnimation/colorAnimation.qml | 1 + .../visual/colorAnimation/data/raster/image0.png | Bin 0 -> 607 bytes .../visual/colorAnimation/data/raster/manifest.qml | 522 +++++++++++++++++++++ .../visual/colorAnimation/data/raster/manifest.xml | 522 +++++++++++++++++++++ .../declarative/visual/colorAnimation/image0.png | Bin 947 -> 0 bytes .../declarative/visual/colorAnimation/manifest.xml | 73 --- tests/auto/declarative/visual/tst_visual.cpp | 4 +- 18 files changed, 1227 insertions(+), 358 deletions(-) delete mode 100644 tests/auto/declarative/visual/bindinganimation/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/bindinganimation/data/opengl/manifest-play.xml delete mode 100644 tests/auto/declarative/visual/bindinganimation/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/bindinganimation/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/bindinganimation/data/raster/manifest.qml create mode 100644 tests/auto/declarative/visual/colorAnimation/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/colorAnimation/data/raster/manifest.qml create mode 100644 tests/auto/declarative/visual/colorAnimation/data/raster/manifest.xml delete mode 100644 tests/auto/declarative/visual/colorAnimation/image0.png delete mode 100644 tests/auto/declarative/visual/colorAnimation/manifest.xml diff --git a/src/declarative/test/qfxtestengine.cpp b/src/declarative/test/qfxtestengine.cpp index 70e600d..0d7e5df 100644 --- a/src/declarative/test/qfxtestengine.cpp +++ b/src/declarative/test/qfxtestengine.cpp @@ -62,7 +62,7 @@ class QFxTestEnginePrivate : public QAbstractAnimation { public: QFxTestEnginePrivate(QFxTestEngine *p) - : q(p), canvas(0), testMode(QFxTestEngine::NoTest), fullFrame(true), + : q(p), canvas(0), testMode(QFxTestEngine::NoTest), fullFrame(true), status(Working), exitOnFail(true), mismatchedFrames(0), lastFrameMismatch(false) {} @@ -106,20 +106,25 @@ public: bool compare(const QImage &img1, const QImage &img2); virtual int duration() const { return -1; } + + int elapsed() { return currentTime(); } }; bool QFxTestEnginePrivate::compare(const QImage &img1, const QImage &img2) { - if (img1.size() != img2.size()) + if (img1.size() != img2.size()) { + qWarning() << "Image size mismatch" << img1.size() << img2.size(); return false; + } int errorCount = 0; for (int yy = 0; yy < img1.height(); ++yy) { for (int xx = 0; xx < img1.width(); ++xx) { if (img1.pixel(xx, yy) != img2.pixel(xx, yy)) { errorCount++; - if (errorCount > MAX_MISMATCHED_PIXELS) + if (errorCount > MAX_MISMATCHED_PIXELS) { return false; + } } } } @@ -142,7 +147,7 @@ QFxTestEngine::QFxTestEngine(TestMode mode, const QString &dir, qWarning("QFxTestEngine: Record ON"); } else if (d->testMode == PlaybackTest) { - QString fileName(d->testDirectory + QLatin1String("/manifest.xml")); + QString fileName(d->testDirectory + QLatin1String("/manifest.qml")); QFile f(fileName); if (!f.open(QIODevice::ReadOnly)) { qWarning() << "QFxTestEngine: Unable to open file" << fileName; @@ -150,13 +155,13 @@ QFxTestEngine::QFxTestEngine(TestMode mode, const QString &dir, } QByteArray data = f.readAll(); - QmlComponent c(&d->engine, data, QUrl(d->testDirectory + QLatin1String("/manifest.xml"))); + QmlComponent c(&d->engine, data, QUrl(d->testDirectory + QLatin1String("/manifest.qml"))); QObject *o = c.create(); TestLog *log = qobject_cast(o); if (log) { log->setParent(this); d->playbackTestData.actions() = log->actions(); - qWarning("QFxTestEngine: Playback ON"); + qWarning() << "QFxTestEngine: Playback ON," << d->playbackTestData.actions().count() << "actions"; } else { delete o; qWarning() << "QFxTestEngine: File" << fileName << "is corrupt."; @@ -165,7 +170,6 @@ QFxTestEngine::QFxTestEngine(TestMode mode, const QString &dir, } if (d->testMode != NoTest) { - QUnifiedTimer::instance()->setConsistentTiming(true); QObject::connect(canvas, SIGNAL(framePainted()), this, SLOT(framePainted())); @@ -173,7 +177,7 @@ QFxTestEngine::QFxTestEngine(TestMode mode, const QString &dir, canvas->installEventFilter(this); for (int ii = 0; ii < d->playbackTestData.actions().count(); ++ii) { TestObject *o = d->playbackTestData.actions().at(ii); - if (TestMouse *m = qobject_cast(o)) + if (TestMouse *m = qobject_cast(o)) d->toPost << m; else if (TestKey *k = qobject_cast(o)) d->toPost << k; @@ -201,7 +205,7 @@ void QFxTestEngine::framePainted() void QFxTestEnginePrivate::recordFullFrameEvent(const QImage &img) { TestFullFrame *ff = new TestFullFrame(q); - ff->setTime(QUnifiedTimer::instance()->elapsedTime()); + ff->setTime(elapsed()); ff->setFrameId(fullFrames.count()); fullFrames << img; @@ -211,7 +215,8 @@ void QFxTestEnginePrivate::recordFullFrameEvent(const QImage &img) TestFullFrame *pf = qobject_cast(playbackTestData.next()); QString filename = testDirectory + QLatin1String("/image") + QString::number(pf->frameId()) + QLatin1String(".png"); QImage recImg(filename); - if (!pf || !compare(recImg, img) || pf->time() != QUnifiedTimer::instance()->elapsedTime()) { + if (!pf || !compare(recImg, img) || pf->time() != elapsed()) { + qDebug() << pf << pf->time() << elapsed(); message(Fail, "FFrame mismatch"); } else { message(Success, "FFrame OK"); @@ -249,14 +254,14 @@ void QFxTestEnginePrivate::recordFrameEvent(const QImage &img) hexResult.append(toHex(result.at(ii))); TestFrame *f = new TestFrame(q); - f->setTime(QUnifiedTimer::instance()->elapsedTime()); + f->setTime(elapsed()); f->setHash(QLatin1String(hexResult)); testData.actions() << f; if (testMode == QFxTestEngine::PlaybackTest) { TestObject *o = playbackTestData.next(); TestFrame *f = qobject_cast(o); - if (!f || f->time() != QUnifiedTimer::instance()->elapsedTime() || + if (!f || f->time() != elapsed() || f->hash() != QLatin1String(hexResult)) { mismatchedFrames++; if (mismatchedFrames > MAX_MISMATCHED_FRAMES || @@ -280,14 +285,13 @@ void QFxTestEnginePrivate::updateCurrentTime(int) return; while(!toPost.isEmpty()) { - int t = QUnifiedTimer::instance()->elapsedTime(); + int t = elapsed(); TestObject *o = toPost.first(); if (testMode == QFxTestEngine::RecordTest) o->setTime(t); else if (o->time() != t) return; toPost.takeFirst(); - if (TestMouse *m = qobject_cast(o)) { QMouseEvent e((QEvent::Type)m->type(), m->pos(), m->globalPos(), (Qt::MouseButton)m->button(), (Qt::MouseButtons)m->buttons(), (Qt::KeyboardModifiers)0); postedEvents.insert(&e); @@ -336,7 +340,7 @@ bool QFxTestEngine::eventFilter(QObject *, QEvent *event) void QFxTestEnginePrivate::recordMouseEvent(QMouseEvent *e) { TestMouse *m = new TestMouse(q); - m->setTime(QUnifiedTimer::instance()->elapsedTime()); + m->setTime(elapsed()); m->setType(e->type()); m->setButton(e->button()); m->setButtons(e->buttons()); @@ -346,14 +350,16 @@ void QFxTestEnginePrivate::recordMouseEvent(QMouseEvent *e) if (testMode == QFxTestEngine::PlaybackTest) { TestMouse *m = qobject_cast(playbackTestData.next()); - if (!m || m->time() != QUnifiedTimer::instance()->elapsedTime() || + if (!m || m->time() != elapsed() || m->type() != e->type() || m->button() != e->button() || m->buttons() != e->buttons() || - m->globalPos() != e->globalPos() || - m->pos() != e->pos()) +// m->globalPos() != e->globalPos() || + m->pos() != e->pos()) { + if (m) + qWarning() << m->time() << elapsed(); message(Fail, "Mouse mismatch"); - else + } else message(Success, "Mouse OK"); testPass(); @@ -366,7 +372,7 @@ void QFxTestEnginePrivate::recordMouseEvent(QMouseEvent *e) void QFxTestEnginePrivate::recordKeyEvent(QKeyEvent *e) { TestKey *k = new TestKey(q); - k->setTime(QUnifiedTimer::instance()->elapsedTime()); + k->setTime(elapsed()); k->setType(e->type()); k->setModifiers(e->QInputEvent::modifiers()); k->setText(e->text()); @@ -374,7 +380,7 @@ void QFxTestEnginePrivate::recordKeyEvent(QKeyEvent *e) testData.actions() << k; if (testMode == QFxTestEngine::PlaybackTest) { TestKey *f = qobject_cast(playbackTestData.next()); - if (!f || f->time() != QUnifiedTimer::instance()->elapsedTime() || + if (!f || f->time() != elapsed() || f->type() != e->type() || f->modifiers() != e->QInputEvent::modifiers() || f->text() != e->text() || @@ -400,7 +406,7 @@ void QFxTestEnginePrivate::message(MessageType t, const char *message) qWarning("%s", message); if (t == Fail) { if (exitOnFail) { - save(QLatin1String("manifest-fail.xml"), false); + save(QLatin1String("manifest-fail.qml"), false); qFatal("Failed"); } else { status = Failed; @@ -428,7 +434,7 @@ void QFxTestEngine::save() if (d->testMode != RecordTest) return; - d->save(QLatin1String("manifest.xml")); + d->save(QLatin1String("manifest.qml")); } void QFxTestEnginePrivate::testPass() @@ -436,7 +442,7 @@ void QFxTestEnginePrivate::testPass() if (playbackTestData.atEnd()) { qWarning("Test PASSED"); if (exitOnFail) { - save(QLatin1String("manifest-play.xml")); + save(QLatin1String("manifest-play.qml")); exit(0); } else { status = Passed; diff --git a/src/declarative/test/qfxtestobjects.cpp b/src/declarative/test/qfxtestobjects.cpp index be1ab07..905e83e 100644 --- a/src/declarative/test/qfxtestobjects.cpp +++ b/src/declarative/test/qfxtestobjects.cpp @@ -42,7 +42,8 @@ #include "qfxtestobjects.h" #include -#include +#include +#include QT_BEGIN_NAMESPACE @@ -59,6 +60,14 @@ QML_DEFINE_TYPE(TestKey,TestKey); QML_DECLARE_TYPE(TestLog); QML_DEFINE_TYPE(TestLog,TestLog); +static QString padding(int pad) +{ + QString p; + while (pad--) + p += QLatin1Char(' '); + return p; +} + TestObject::TestObject(QObject *parent) : QObject(parent), _time(-1) { @@ -77,11 +86,11 @@ void TestObject::setTime(int t) emit dataChanged(); } -void TestObject::save(QXmlStreamWriter *device) +void TestObject::save(QTextStream &device, int pad) { - device->writeStartElement(QLatin1String("TestObject")); - device->writeAttribute(QLatin1String("time"), QString::number(time())); - device->writeEndElement(); + device << padding(pad) << QLatin1String("TestObject {") << endl; + device << padding(pad) << QLatin1String("time: ") << QString::number(time()) << endl; + device << padding(pad) << QLatin1String("}") << endl; } @@ -103,12 +112,12 @@ void TestFrame::setHash(const QString &h) emit frameChanged(); } -void TestFrame::save(QXmlStreamWriter *device) +void TestFrame::save(QTextStream &device, int pad) { - device->writeStartElement(QLatin1String("TestFrame")); - device->writeAttribute(QLatin1String("time"), QLatin1String(QByteArray::number(time()))); - device->writeAttribute(QLatin1String("hash"), hash()); - device->writeEndElement(); + device << padding(pad) << QLatin1String("TestFrame {") << endl; + device << padding(pad+4) << QLatin1String("time: ") << QLatin1String(QByteArray::number(time())) << endl; + device << padding(pad+4)<< QLatin1String("hash: '") << hash() << QLatin1String("'") << endl; + device << padding(pad) << QLatin1Char('}') << endl; } TestFullFrame::TestFullFrame(QObject *parent) @@ -129,12 +138,12 @@ void TestFullFrame::setFrameId(int id) emit frameChanged(); } -void TestFullFrame::save(QXmlStreamWriter *device) +void TestFullFrame::save(QTextStream &device, int pad) { - device->writeStartElement(QLatin1String("TestFullFrame")); - device->writeAttribute(QLatin1String("time"), QLatin1String(QByteArray::number(time()))); - device->writeAttribute(QLatin1String("frameId"), QLatin1String(QByteArray::number(frameId()))); - device->writeEndElement(); + device << padding(pad) << QLatin1String("TestFullFrame {") << endl; + device << padding(pad+4) << QLatin1String("time: ") << QLatin1String(QByteArray::number(time())) << endl; + device << padding(pad+4) << QLatin1String("frameId: ") << QLatin1String(QByteArray::number(frameId())) << endl; + device << padding(pad) << padding(pad) << QLatin1String("}") << endl; } TestMouse::TestMouse(QObject *parent) @@ -207,16 +216,16 @@ void TestMouse::setPos(const QPoint &p) emit mouseChanged(); } -void TestMouse::save(QXmlStreamWriter *device) +void TestMouse::save(QTextStream &device, int pad) { - device->writeStartElement(QLatin1String("TestMouse")); - device->writeAttribute(QLatin1String("time"), QString::number(time())); - device->writeAttribute(QLatin1String("type"), QString::number(type())); - device->writeAttribute(QLatin1String("button"), QString::number(button())); - device->writeAttribute(QLatin1String("buttons"), QString::number(buttons())); - device->writeAttribute(QLatin1String("globalPos"), QString::number(globalPos().x()) + QLatin1String(",") + QString::number(globalPos().y())); - device->writeAttribute(QLatin1String("pos"), QString::number(pos().x()) + QLatin1String(",") + QString::number(pos().y())); - device->writeEndElement(); + device << padding(pad) << QLatin1String("TestMouse {") << endl; + device << padding(pad+4) << QLatin1String("time: ") << QString::number(time()) << endl; + device << padding(pad+4) << QLatin1String("type: ") << QString::number(type()) << endl; + device << padding(pad+4) << QLatin1String("button: ") << QString::number(button()) << endl; + device << padding(pad+4) << QLatin1String("buttons: ") << QString::number(buttons()) << endl; + device << padding(pad+4) << QLatin1String("globalPos: '") << QString::number(globalPos().x()) + QLatin1String(",") + QString::number(globalPos().y()) << QLatin1String("'") << endl; + device << padding(pad+4) << QLatin1String("pos: '") << QString::number(pos().x()) + QLatin1String(",") + QString::number(pos().y()) << QLatin1String("'") << endl; + device << padding(pad) << QLatin1String("}") << endl; } TestKey::TestKey(QObject *parent) @@ -276,16 +285,16 @@ void TestKey::setKey(int k) emit keyChanged(); } -void TestKey::save(QXmlStreamWriter *device) +void TestKey::save(QTextStream &device, int pad) { - device->writeStartElement(QLatin1String("TestKey")); - device->writeAttribute(QLatin1String("time"), QString::number(time())); - device->writeAttribute(QLatin1String("type"), QString::number(type())); - device->writeAttribute(QLatin1String("modifiers"), QString::number(modifiers())); - device->writeAttribute(QLatin1String("key"), QString::number(key())); + device << padding(pad) << QLatin1String("TestKey {") << endl; + device << padding(pad+4) << QLatin1String("time: ") << QString::number(time()) << endl; + device << padding(pad+4) << QLatin1String("type: ") << QString::number(type()) << endl; + device << padding(pad+4) << QLatin1String("modifiers: ") << QString::number(modifiers()) << endl; + device << padding(pad+4) << QLatin1String("key: ") << QString::number(key()) << endl; if (key() != Qt::Key_Escape) - device->writeAttribute(QLatin1String("text"), text()); - device->writeEndElement(); + device << padding(pad+4) << QLatin1String("text: '") << text() << QLatin1String("'")<< endl; + device << padding(pad) << QLatin1String("}") << endl; } TestLog::TestLog(QObject *parent) @@ -313,14 +322,11 @@ void TestLog::save(QIODevice *device) // Order correctly qStableSort(_actions.begin(), _actions.end(), lessThan); - QXmlStreamWriter writer(device); - writer.setAutoFormatting(true); - writer.writeStartDocument(QLatin1String("1.0")); - writer.writeStartElement(QLatin1String("TestLog")); + QTextStream writer(device); + writer << QLatin1String("TestLog {") << endl; for (int ii = 0; ii < _actions.count(); ++ii) - _actions.at(ii)->save(&writer); - writer.writeEndElement(); - writer.writeEndDocument(); + _actions.at(ii)->save(writer, 4); + writer << QLatin1String("}") << endl; } TestObject *TestLog::next() diff --git a/src/declarative/test/qfxtestobjects.h b/src/declarative/test/qfxtestobjects.h index 653656e..de4d94b 100644 --- a/src/declarative/test/qfxtestobjects.h +++ b/src/declarative/test/qfxtestobjects.h @@ -45,7 +45,7 @@ #include #include #include -#include +#include QT_BEGIN_HEADER @@ -64,7 +64,7 @@ public: int time() const; void setTime(int); - virtual void save(QXmlStreamWriter *); + virtual void save(QTextStream &, int pad); Q_SIGNALS: void dataChanged(); @@ -82,7 +82,7 @@ public: QString hash() const; void setHash(const QString &); - virtual void save(QXmlStreamWriter *); + virtual void save(QTextStream &, int pad); Q_SIGNALS: void frameChanged(); @@ -100,7 +100,7 @@ public: int frameId() const; void setFrameId(int); - virtual void save(QXmlStreamWriter *); + virtual void save(QTextStream &, int pad); Q_SIGNALS: void frameChanged(); @@ -134,7 +134,7 @@ public: QPoint pos() const; void setPos(const QPoint &); - virtual void save(QXmlStreamWriter *); + virtual void save(QTextStream &, int pad); Q_SIGNALS: void mouseChanged(); @@ -169,7 +169,7 @@ public: int key() const; void setKey(int); - virtual void save(QXmlStreamWriter *); + virtual void save(QTextStream &, int pad); Q_SIGNALS: void keyChanged(); diff --git a/src/declarative/test/qfxtestview.cpp b/src/declarative/test/qfxtestview.cpp index 94bcb30..0bd5a6b 100644 --- a/src/declarative/test/qfxtestview.cpp +++ b/src/declarative/test/qfxtestview.cpp @@ -57,6 +57,7 @@ QFxTestView::QFxTestView(const QString &filename, const QString &testdir) testEngine = new QFxTestEngine(QFxTestEngine::PlaybackTest, testdir, this, this); + qWarning() << "Testing:" << filename; QFile file(filename); file.open(QFile::ReadOnly); QString qml = QString::fromUtf8(file.readAll()); @@ -67,6 +68,8 @@ QFxTestView::QFxTestView(const QString &filename, const QString &testdir) void QFxTestView::setSceneSize(QSize s) { + if (s.isNull()) + qWarning() << "Scene size is invalid"; setFixedSize(s); } diff --git a/tests/auto/declarative/listview/tst_listview.cpp b/tests/auto/declarative/listview/tst_listview.cpp index 25f546a..8cf0a85 100644 --- a/tests/auto/declarative/listview/tst_listview.cpp +++ b/tests/auto/declarative/listview/tst_listview.cpp @@ -169,7 +169,7 @@ tst_QFxListView::tst_QFxListView() template void tst_QFxListView::items() { - QFxView *canvas = createView(SRCDIR "/data/listview.xml"); + QFxView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -205,7 +205,7 @@ void tst_QFxListView::items() template void tst_QFxListView::changed() { - QFxView *canvas = createView(SRCDIR "/data/listview.xml"); + QFxView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -238,7 +238,7 @@ void tst_QFxListView::changed() template void tst_QFxListView::inserted() { - QFxView *canvas = createView(SRCDIR "/data/listview.xml"); + QFxView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -305,7 +305,7 @@ void tst_QFxListView::inserted() template void tst_QFxListView::removed() { - QFxView *canvas = createView(SRCDIR "/data/listview.xml"); + QFxView *canvas = createView(SRCDIR "/data/listview.qml"); T model; for (int i = 0; i < 30; i++) @@ -445,8 +445,8 @@ QFxView *tst_QFxListView::createView(const QString &filename) QFile file(filename); file.open(QFile::ReadOnly); - QString xml = file.readAll(); - canvas->setQml(xml, filename); + QString qml = file.readAll(); + canvas->setQml(qml, filename); return canvas; } @@ -459,8 +459,10 @@ template T *tst_QFxListView::findItem(QFxItem *parent, const QString &id, int index) { const QMetaObject &mo = T::staticMetaObject; + qDebug() << parent->children()->count() << "children"; for (int i = 0; i < parent->children()->count(); ++i) { QFxItem *item = parent->children()->at(i); + qDebug() << "try" << item; if (mo.cast(item) && (id.isEmpty() || item->id() == id)) { if (index != -1) { QmlExpression e(qmlContext(item), "index", item); diff --git a/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml index 56878dc..61cedc2 100644 --- a/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml +++ b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml @@ -35,6 +35,6 @@ Rect { MouseRegion { id: MyMouseRegion anchors.fill: parent - onClicked: { Page.currentState= 'hello' } + onClicked: { Page.state= 'hello' } } } diff --git a/tests/auto/declarative/visual/bindinganimation/data/opengl/image0.png b/tests/auto/declarative/visual/bindinganimation/data/opengl/image0.png deleted file mode 100644 index 2cda3fa..0000000 Binary files a/tests/auto/declarative/visual/bindinganimation/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest-play.xml b/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest-play.xml deleted file mode 100644 index 6c5856f..0000000 --- a/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest-play.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest.xml b/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest.xml deleted file mode 100644 index 6c5856f..0000000 --- a/tests/auto/declarative/visual/bindinganimation/data/opengl/manifest.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/bindinganimation/data/raster/image0.png b/tests/auto/declarative/visual/bindinganimation/data/raster/image0.png new file mode 100644 index 0000000..92f8cdd Binary files /dev/null and b/tests/auto/declarative/visual/bindinganimation/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/bindinganimation/data/raster/manifest.qml b/tests/auto/declarative/visual/bindinganimation/data/raster/manifest.qml new file mode 100644 index 0000000..1454949 --- /dev/null +++ b/tests/auto/declarative/visual/bindinganimation/data/raster/manifest.qml @@ -0,0 +1,86 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } + TestMouse { + time: 1296 + type: 2 + button: 1 + buttons: 1 + globalPos: '87,985' + pos: '83,29' + } + TestMouse { + time: 1360 + type: 3 + button: 1 + buttons: 0 + globalPos: '87,985' + pos: '83,29' + } + TestFrame { + time: 1376 + hash: '7CB5FC371040E587DE9F06CE14A4B29A' + } + TestFrame { + time: 1392 + hash: 'A5E5DBD179C7E48D34B8107F8CC6B5BE' + } + TestFrame { + time: 1408 + hash: 'A5E5DBD179C7E48D34B8107F8CC6B5BE' + } + TestFrame { + time: 1424 + hash: '69FB651AA84E07E4A6DEAA31CB10641B' + } + TestFrame { + time: 1440 + hash: '3FFC4C4BD282010A359DCEAF2D8496AC' + } + TestFrame { + time: 1456 + hash: '3FFC4C4BD282010A359DCEAF2D8496AC' + } + TestFrame { + time: 1472 + hash: 'ADA58B13247A654BBCECF3F254AB797F' + } + TestFrame { + time: 1488 + hash: 'B314799BC732B6BD8C42A622B720E3D5' + } + TestFrame { + time: 1504 + hash: 'B314799BC732B6BD8C42A622B720E3D5' + } + TestFrame { + time: 1520 + hash: '7377569C13CF5DE368B22209AB8AE395' + } + TestFrame { + time: 1536 + hash: '7C1E4A1F80C68EE57D052A9D7851F937' + } + TestFrame { + time: 1552 + hash: '7C1E4A1F80C68EE57D052A9D7851F937' + } + TestFrame { + time: 1568 + hash: '24D6DB9544205075836A86A54B55A820' + } + TestFrame { + time: 1584 + hash: '24D6DB9544205075836A86A54B55A820' + } + TestFrame { + time: 1600 + hash: '8A84E4C3E8AD4C6A9A7BD3E1620718C1' + } + TestFrame { + time: 1616 + hash: 'B8EA544A4EF3B7E0A9E0A7777B55EDC7' + } +} diff --git a/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml index 69460c5..d351b8c 100644 --- a/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml +++ b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml @@ -1,5 +1,6 @@ Rect { id: mainrect + width: 200; height: 200 state: "first" states: [ State { diff --git a/tests/auto/declarative/visual/colorAnimation/data/raster/image0.png b/tests/auto/declarative/visual/colorAnimation/data/raster/image0.png new file mode 100644 index 0000000..f00a2e2 Binary files /dev/null and b/tests/auto/declarative/visual/colorAnimation/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.qml b/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.qml new file mode 100644 index 0000000..0eb8b12 --- /dev/null +++ b/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.qml @@ -0,0 +1,522 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } + TestMouse { + time: 944 + type: 2 + button: 1 + buttons: 1 + globalPos: '1789,188' + pos: '73,76' + } + TestMouse { + time: 992 + type: 3 + button: 1 + buttons: 0 + globalPos: '1789,188' + pos: '73,76' + } + TestFrame { + time: 1008 + hash: 'E5BDA0DAF98288CE18DB6CE06EDA3BA0' + } + TestFrame { + time: 1024 + hash: 'D35008F75B8C992F80FB16BA7203649D' + } + TestFrame { + time: 1040 + hash: '14F43E0784DDF42EA8550DB88C501BF1' + } + TestFrame { + time: 1056 + hash: '02276E158B5391480B1BDEAADF1FB903' + } + TestFrame { + time: 1072 + hash: '35D9513EB97A2C482B7CD197DE910934' + } + TestFrame { + time: 1088 + hash: 'FAF0FD681E60BB2489099F5DF772B6CD' + } + TestFrame { + time: 1104 + hash: 'A863D3E346F94785A3A392FDC91526EB' + } + TestFrame { + time: 1120 + hash: 'FDF328D3F6EB8410DA59A91345E41A44' + } + TestFrame { + time: 1136 + hash: '83514A3B10D5BE8F6C3B128D0F3E0B1C' + } + TestFrame { + time: 1152 + hash: 'EAD0EAE76CD00189075964671EFFBAEA' + } + TestFrame { + time: 1168 + hash: '24D2457FCD51490FDA23071BF9929D12' + } + TestFrame { + time: 1184 + hash: '1478683446CF543DACBE31D0B76A98A6' + } + TestFrame { + time: 1200 + hash: '99F7DA1F31FE920F6C02ADD4042AE925' + } + TestFrame { + time: 1216 + hash: '22DEF892006CF66667770B0F17BAF6C0' + } + TestFrame { + time: 1232 + hash: '6A36D5A77099BFD58BAF285478FF04E4' + } + TestFrame { + time: 1248 + hash: '6258150666B59B20AB476724C07FC20C' + } + TestFrame { + time: 1264 + hash: 'F1636315BC950A6DD400D9C7ED263B88' + } + TestFrame { + time: 1280 + hash: '18447EA8DC2E8DA956788E5B3CF3790A' + } + TestFrame { + time: 1296 + hash: '1D2A6E65997A73E9E670356C8E8B63B2' + } + TestFrame { + time: 1312 + hash: 'BED0242C0F9EF229D1392835286D5782' + } + TestFrame { + time: 1328 + hash: '88923C190E9E5BEADEF8A409C06DF9D6' + } + TestFrame { + time: 1344 + hash: '2D133E7EE60C97386F57838B3F0976C7' + } + TestFrame { + time: 1360 + hash: '85B1821CC50F2A9F3ED6944F792B7A2F' + } + TestFrame { + time: 1376 + hash: '395195716D76BC0BE7B2033ED37A7A1C' + } + TestFrame { + time: 1392 + hash: '243DBFFCF416926242BBCB7348974C4C' + } + TestFrame { + time: 1408 + hash: 'A755068679616D8AC65C2AA7431F2A19' + } + TestFrame { + time: 1424 + hash: 'E8249B35A47EB492CBDF2D91CC8426F0' + } + TestFrame { + time: 1440 + hash: '15F3DA1C0E6F0779B96859D51171DD27' + } + TestFrame { + time: 1456 + hash: '258C0C756AAC3DE743B43051F2AACE6B' + } + TestFrame { + time: 1472 + hash: 'A58B9FDF301D72B2CC5C93934CC8927B' + } + TestFrame { + time: 1488 + hash: 'A9181D30870D472521F8904818CE520F' + } + TestFrame { + time: 1504 + hash: '7F9E94069CCF3897C26A71BD7BECD903' + } + TestFrame { + time: 1520 + hash: 'BDF305C2F46CDB86DBF57B1E0CC5A65B' + } + TestFrame { + time: 1536 + hash: 'FE5B6865D7E4FC7D1D42C1E74F8666F7' + } + TestFrame { + time: 1552 + hash: '734F0DE45A6E34C9EAB7EF606196F96A' + } + TestFrame { + time: 1568 + hash: '02A361C4534FDF7F286DC3E6DC23275C' + } + TestFrame { + time: 1584 + hash: 'E649155AD69999C14B92F6561E4D1185' + } + TestFrame { + time: 1600 + hash: '01AF177084FAB755D622973F64B92018' + } + TestFrame { + time: 1616 + hash: '097CC4A082DFAB995D213A3A73883C97' + } + TestFrame { + time: 1632 + hash: 'D7B4239A3280B1EB8E885E3F422DF8E9' + } + TestFrame { + time: 1648 + hash: '59893977994E34E83F91E7CE3AD65D6D' + } + TestFrame { + time: 1664 + hash: 'B68E3FBB5CDCD6BD96DF7DEC558DB42B' + } + TestFrame { + time: 1680 + hash: '94AD0580648F36A1E18A9EA7E249B04D' + } + TestFrame { + time: 1696 + hash: '750A4C01D2F5806A89A1C6CC6A9B9A68' + } + TestFrame { + time: 1712 + hash: '4F109F50F388F1BFA4BC6B03B3E6E514' + } + TestFrame { + time: 1728 + hash: 'C6168D5CF27A533E8EE636637667BE47' + } + TestFrame { + time: 1744 + hash: 'F8120547BED987AA34C00DA5A01A4D1E' + } + TestFrame { + time: 1760 + hash: 'CBFF526136FA2C128C8B898FBBEF9E5C' + } + TestFrame { + time: 1776 + hash: 'F29E52398FAB1A239A63DF4C32F2FC69' + } + TestFrame { + time: 1792 + hash: '7178BFE86FD2FD513218B33760460F8D' + } + TestFrame { + time: 1808 + hash: 'CA83285BC8AC633403896FE976896EB0' + } + TestFrame { + time: 1824 + hash: '96BA486C09CC69D5AA38C46C00DF1181' + } + TestFrame { + time: 1840 + hash: 'B88EAB335842787869F4A14824C19DD8' + } + TestFrame { + time: 1856 + hash: '065AA59012729E1E1A246A2083142690' + } + TestFrame { + time: 1872 + hash: 'DD0E98C8398861002C5F178C5F9F612D' + } + TestFrame { + time: 1888 + hash: '04192C2B545948048ECCF4D81BBDE198' + } + TestFrame { + time: 1904 + hash: 'BB7502C7208281EF9FD41714AB88A1A8' + } + TestFrame { + time: 1920 + hash: '5397195471890D08B703DCA101E5BC7C' + } + TestFrame { + time: 1936 + hash: '4C678CDBEBB2FFD2CBF012CA77800CDE' + } + TestFrame { + time: 1952 + hash: '0D7A34ECD0C7F52B2C015037BF1902C6' + } + TestFrame { + time: 1968 + hash: 'FD9D5048BE749AC4369FDA2D018B43AE' + } + TestFrame { + time: 1984 + hash: '93EE03795CD57AE6F7FE3A020B039AD4' + } + TestFrame { + time: 2000 + hash: '5E1118963F219C39761CA7FBF564A9CA' + } + TestFrame { + time: 2016 + hash: '8F40038741903150136170503649D941' + } + TestFrame { + time: 2032 + hash: 'B087B7D0AA6224821F8E18718FF5E77D' + } + TestFrame { + time: 2048 + hash: 'AA46B04A3C67DC772265ED2901955565' + } + TestFrame { + time: 2064 + hash: 'AC024BF2AEB4BECDF31A09FE0A6DB8F3' + } + TestFrame { + time: 2080 + hash: '13745A174E4D06E2108A5BF125BA50CC' + } + TestFrame { + time: 2096 + hash: 'BD972F0D8E230ECA0B3FEA1B8C960C08' + } + TestFrame { + time: 2112 + hash: 'CBDBEC802A58E7CED0CF45B3AB0BC0BA' + } + TestFrame { + time: 2128 + hash: '5128584C50305C7D218B81B8367FA3D5' + } + TestFrame { + time: 2144 + hash: 'A71461D3593F3685620668916DE870BD' + } + TestFrame { + time: 2160 + hash: '74EBAC8F32CF044B58D9883DBCD9A722' + } + TestFrame { + time: 2176 + hash: 'FEDC5B638F339B90FE59B478721E65B7' + } + TestFrame { + time: 2192 + hash: 'BCB8C7159F54C353551DD3BFF3203966' + } + TestFrame { + time: 2208 + hash: '4E9B083075BC5E9287A8ABC982778B56' + } + TestFrame { + time: 2224 + hash: '1D6F02AA99AFA47D77FC49AB894B365A' + } + TestFrame { + time: 2240 + hash: 'A204FEEC783B3B05DE4C209C21745826' + } + TestFrame { + time: 2256 + hash: '665A2A8FF00B9663157802767F504754' + } + TestFrame { + time: 2272 + hash: '624FB09EBE60CB87D767FAF8D2420B1E' + } + TestFrame { + time: 2288 + hash: 'E5AF0CDC33F3275A25ABB09E9165F310' + } + TestFrame { + time: 2304 + hash: '02BAFB5A81CA66F7670AC93DE5123860' + } + TestFrame { + time: 2320 + hash: 'E7AA6374C73832E57CEB2427A1E258AA' + } + TestFrame { + time: 2336 + hash: 'B5ABD0DFF1AB076FAAC7CC226E83F5D0' + } + TestFrame { + time: 2352 + hash: 'B759ACC35BCCFF8EFC2E6FE276DDC0F7' + } + TestFrame { + time: 2368 + hash: 'CE52E18C1F7732768779863B45314FF5' + } + TestFrame { + time: 2384 + hash: '99D30652559DD6931E0C95543EEAA149' + } + TestFrame { + time: 2400 + hash: 'FFBD9A00E05E085B89296D19D5CAEC57' + } + TestFrame { + time: 2416 + hash: '9C9D658B9C25602816B8066BF19105DB' + } + TestFrame { + time: 2432 + hash: '2B7FD058E6601E22A30BB7106B1C683B' + } + TestFrame { + time: 2448 + hash: 'F4C7E26B19EE0A3E7C9688685EB7BD05' + } + TestFrame { + time: 2464 + hash: '0DC6D593BCEFF56B7F81F2A49D37FEFB' + } + TestFrame { + time: 2480 + hash: '9BFD7AD5091CCBDDE43C593E133A7B10' + } + TestFrame { + time: 2496 + hash: '2703B617937914A90EA42EBF249D79EE' + } + TestFrame { + time: 2512 + hash: 'B77E2983138254016C4CCA53100F46FA' + } + TestFrame { + time: 2528 + hash: '60C4DD24187D1281081479E586F02B37' + } + TestFrame { + time: 2544 + hash: '62F2511ABD99EF1231C9FA4B91D4ABFE' + } + TestFrame { + time: 2560 + hash: 'E309B3353FD174E883D309571CADDC98' + } + TestFrame { + time: 2576 + hash: '1E2D6A134C7B12DDE551B148EF4F088C' + } + TestFrame { + time: 2592 + hash: 'E5DC5450604A491CC24A0DCF5C278B58' + } + TestFrame { + time: 2608 + hash: 'C8DAE97C10E1962C1E6A51AB3AB8579E' + } + TestFrame { + time: 2624 + hash: '4E1B7E06F55FB084080689B474F1FE1D' + } + TestFrame { + time: 2640 + hash: 'B4639C907FA937BF15FAC62421170CD8' + } + TestFrame { + time: 2656 + hash: 'C250208A0CAEB5F6CB4D3AAC3D7D350B' + } + TestFrame { + time: 2672 + hash: 'A73351EABECF0D71149EFE31F197413E' + } + TestFrame { + time: 2688 + hash: '479425F1B7AFF79E4DFB7FCA534AF018' + } + TestFrame { + time: 2704 + hash: '046D0F0040A52D1F26BA9F7C5DE06EF4' + } + TestFrame { + time: 2720 + hash: '655778BF13C6080903150B0EB43A7EDC' + } + TestFrame { + time: 2736 + hash: '72DA0BBE81514870655FDD3354ADAC60' + } + TestFrame { + time: 2752 + hash: 'DEFE0BDF675C65FFF55AAACED1E4DAE7' + } + TestFrame { + time: 2768 + hash: 'C988628B6C3D3780E9A865C7694926CD' + } + TestFrame { + time: 2784 + hash: '5AB17563655231089EDD986FF13D6012' + } + TestFrame { + time: 2800 + hash: 'C1ADFF1D2E5800ED466D1691D3B17382' + } + TestFrame { + time: 2816 + hash: '70129BA01FBB19592B9DC0D0A3B3E7DF' + } + TestFrame { + time: 2832 + hash: '0000829EF7ED908BF430D42904D59CC2' + } + TestFrame { + time: 2848 + hash: '843D2927F50AB87B4A86B7A6AAEED91F' + } + TestFrame { + time: 2864 + hash: 'DA86D21756025E7DE8050586D5E2A1F8' + } + TestFrame { + time: 2880 + hash: '48DD1BD6580133B0793FEE327EA4F1E6' + } + TestFrame { + time: 2896 + hash: 'F0618193DCD0BA2837249515A1898B1C' + } + TestFrame { + time: 2912 + hash: 'A530184E57251065286C0CBBA7301E9C' + } + TestFrame { + time: 2928 + hash: '64A1D7203973D65DD342793007A61C58' + } + TestFrame { + time: 2944 + hash: '5B830DFC6BA442772DE87D75D5A578DE' + } + TestFrame { + time: 2960 + hash: '5563B056B0409B65F60DD16DD0DD890E' + } + TestFrame { + time: 2976 + hash: 'B8BCF9AD2CA8720C11563A23D8280804' + } + TestFrame { + time: 2992 + hash: '8C0FCDA4F8956394C53FC4BA18CAA850' + } +} diff --git a/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.xml b/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.xml new file mode 100644 index 0000000..1fe2f15 --- /dev/null +++ b/tests/auto/declarative/visual/colorAnimation/data/raster/manifest.xml @@ -0,0 +1,522 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } + TestFrame { + time: 16 + hash: 'E5BDA0DAF98288CE18DB6CE06EDA3BA0' + } + TestFrame { + time: 32 + hash: 'D35008F75B8C992F80FB16BA7203649D' + } + TestFrame { + time: 48 + hash: '14F43E0784DDF42EA8550DB88C501BF1' + } + TestFrame { + time: 64 + hash: '02276E158B5391480B1BDEAADF1FB903' + } + TestFrame { + time: 80 + hash: '35D9513EB97A2C482B7CD197DE910934' + } + TestFrame { + time: 96 + hash: 'FAF0FD681E60BB2489099F5DF772B6CD' + } + TestFrame { + time: 112 + hash: 'A863D3E346F94785A3A392FDC91526EB' + } + TestFrame { + time: 128 + hash: 'FDF328D3F6EB8410DA59A91345E41A44' + } + TestFrame { + time: 144 + hash: '83514A3B10D5BE8F6C3B128D0F3E0B1C' + } + TestFrame { + time: 160 + hash: 'EAD0EAE76CD00189075964671EFFBAEA' + } + TestFrame { + time: 176 + hash: '24D2457FCD51490FDA23071BF9929D12' + } + TestFrame { + time: 192 + hash: '1478683446CF543DACBE31D0B76A98A6' + } + TestFrame { + time: 208 + hash: '99F7DA1F31FE920F6C02ADD4042AE925' + } + TestFrame { + time: 224 + hash: '22DEF892006CF66667770B0F17BAF6C0' + } + TestFrame { + time: 240 + hash: '6A36D5A77099BFD58BAF285478FF04E4' + } + TestFrame { + time: 256 + hash: '6258150666B59B20AB476724C07FC20C' + } + TestFrame { + time: 272 + hash: 'F1636315BC950A6DD400D9C7ED263B88' + } + TestFrame { + time: 288 + hash: '18447EA8DC2E8DA956788E5B3CF3790A' + } + TestFrame { + time: 304 + hash: '1D2A6E65997A73E9E670356C8E8B63B2' + } + TestFrame { + time: 320 + hash: 'BED0242C0F9EF229D1392835286D5782' + } + TestFrame { + time: 336 + hash: '88923C190E9E5BEADEF8A409C06DF9D6' + } + TestFrame { + time: 352 + hash: '2D133E7EE60C97386F57838B3F0976C7' + } + TestFrame { + time: 368 + hash: '85B1821CC50F2A9F3ED6944F792B7A2F' + } + TestFrame { + time: 384 + hash: '395195716D76BC0BE7B2033ED37A7A1C' + } + TestFrame { + time: 400 + hash: '243DBFFCF416926242BBCB7348974C4C' + } + TestFrame { + time: 416 + hash: 'A755068679616D8AC65C2AA7431F2A19' + } + TestFrame { + time: 432 + hash: 'E8249B35A47EB492CBDF2D91CC8426F0' + } + TestFrame { + time: 448 + hash: '15F3DA1C0E6F0779B96859D51171DD27' + } + TestFrame { + time: 464 + hash: '258C0C756AAC3DE743B43051F2AACE6B' + } + TestFrame { + time: 480 + hash: 'A58B9FDF301D72B2CC5C93934CC8927B' + } + TestFrame { + time: 496 + hash: 'A9181D30870D472521F8904818CE520F' + } + TestFrame { + time: 512 + hash: '7F9E94069CCF3897C26A71BD7BECD903' + } + TestFrame { + time: 528 + hash: 'BDF305C2F46CDB86DBF57B1E0CC5A65B' + } + TestFrame { + time: 544 + hash: 'FE5B6865D7E4FC7D1D42C1E74F8666F7' + } + TestFrame { + time: 560 + hash: '734F0DE45A6E34C9EAB7EF606196F96A' + } + TestFrame { + time: 576 + hash: '02A361C4534FDF7F286DC3E6DC23275C' + } + TestFrame { + time: 592 + hash: 'E649155AD69999C14B92F6561E4D1185' + } + TestFrame { + time: 608 + hash: '01AF177084FAB755D622973F64B92018' + } + TestFrame { + time: 624 + hash: '097CC4A082DFAB995D213A3A73883C97' + } + TestFrame { + time: 640 + hash: 'D7B4239A3280B1EB8E885E3F422DF8E9' + } + TestFrame { + time: 656 + hash: '59893977994E34E83F91E7CE3AD65D6D' + } + TestFrame { + time: 672 + hash: 'B68E3FBB5CDCD6BD96DF7DEC558DB42B' + } + TestFrame { + time: 688 + hash: '94AD0580648F36A1E18A9EA7E249B04D' + } + TestFrame { + time: 704 + hash: '750A4C01D2F5806A89A1C6CC6A9B9A68' + } + TestFrame { + time: 720 + hash: '4F109F50F388F1BFA4BC6B03B3E6E514' + } + TestFrame { + time: 736 + hash: 'C6168D5CF27A533E8EE636637667BE47' + } + TestFrame { + time: 752 + hash: 'F8120547BED987AA34C00DA5A01A4D1E' + } + TestFrame { + time: 768 + hash: 'CBFF526136FA2C128C8B898FBBEF9E5C' + } + TestFrame { + time: 784 + hash: 'F29E52398FAB1A239A63DF4C32F2FC69' + } + TestFrame { + time: 800 + hash: '7178BFE86FD2FD513218B33760460F8D' + } + TestFrame { + time: 816 + hash: 'CA83285BC8AC633403896FE976896EB0' + } + TestFrame { + time: 832 + hash: '96BA486C09CC69D5AA38C46C00DF1181' + } + TestFrame { + time: 848 + hash: 'B88EAB335842787869F4A14824C19DD8' + } + TestFrame { + time: 864 + hash: '065AA59012729E1E1A246A2083142690' + } + TestFrame { + time: 880 + hash: 'DD0E98C8398861002C5F178C5F9F612D' + } + TestFrame { + time: 896 + hash: '04192C2B545948048ECCF4D81BBDE198' + } + TestMouse { + time: 912 + type: 2 + button: 1 + buttons: 1 + globalPos: '1739,207' + pos: '75,95' + } + TestFrame { + time: 912 + hash: 'BB7502C7208281EF9FD41714AB88A1A8' + } + TestFrame { + time: 928 + hash: '5397195471890D08B703DCA101E5BC7C' + } + TestFrame { + time: 944 + hash: '4C678CDBEBB2FFD2CBF012CA77800CDE' + } + TestFrame { + time: 960 + hash: '0D7A34ECD0C7F52B2C015037BF1902C6' + } + TestMouse { + time: 976 + type: 3 + button: 1 + buttons: 0 + globalPos: '1739,207' + pos: '75,95' + } + TestFrame { + time: 976 + hash: 'FD9D5048BE749AC4369FDA2D018B43AE' + } + TestFrame { + time: 992 + hash: '93EE03795CD57AE6F7FE3A020B039AD4' + } + TestFrame { + time: 1008 + hash: '5E1118963F219C39761CA7FBF564A9CA' + } + TestFrame { + time: 1024 + hash: '8F40038741903150136170503649D941' + } + TestFrame { + time: 1040 + hash: 'B087B7D0AA6224821F8E18718FF5E77D' + } + TestFrame { + time: 1056 + hash: 'AA46B04A3C67DC772265ED2901955565' + } + TestFrame { + time: 1072 + hash: 'AC024BF2AEB4BECDF31A09FE0A6DB8F3' + } + TestFrame { + time: 1088 + hash: '13745A174E4D06E2108A5BF125BA50CC' + } + TestFrame { + time: 1104 + hash: 'BD972F0D8E230ECA0B3FEA1B8C960C08' + } + TestFrame { + time: 1120 + hash: 'CBDBEC802A58E7CED0CF45B3AB0BC0BA' + } + TestFrame { + time: 1136 + hash: '5128584C50305C7D218B81B8367FA3D5' + } + TestFrame { + time: 1152 + hash: 'A71461D3593F3685620668916DE870BD' + } + TestFrame { + time: 1168 + hash: '74EBAC8F32CF044B58D9883DBCD9A722' + } + TestFrame { + time: 1184 + hash: 'FEDC5B638F339B90FE59B478721E65B7' + } + TestFrame { + time: 1200 + hash: 'BCB8C7159F54C353551DD3BFF3203966' + } + TestFrame { + time: 1216 + hash: '4E9B083075BC5E9287A8ABC982778B56' + } + TestFrame { + time: 1232 + hash: '1D6F02AA99AFA47D77FC49AB894B365A' + } + TestFrame { + time: 1248 + hash: 'A204FEEC783B3B05DE4C209C21745826' + } + TestFrame { + time: 1264 + hash: '665A2A8FF00B9663157802767F504754' + } + TestFrame { + time: 1280 + hash: '624FB09EBE60CB87D767FAF8D2420B1E' + } + TestFrame { + time: 1296 + hash: 'E5AF0CDC33F3275A25ABB09E9165F310' + } + TestFrame { + time: 1312 + hash: '02BAFB5A81CA66F7670AC93DE5123860' + } + TestFrame { + time: 1328 + hash: 'E7AA6374C73832E57CEB2427A1E258AA' + } + TestFrame { + time: 1344 + hash: 'B5ABD0DFF1AB076FAAC7CC226E83F5D0' + } + TestFrame { + time: 1360 + hash: 'B759ACC35BCCFF8EFC2E6FE276DDC0F7' + } + TestFrame { + time: 1376 + hash: 'CE52E18C1F7732768779863B45314FF5' + } + TestFrame { + time: 1392 + hash: '99D30652559DD6931E0C95543EEAA149' + } + TestFrame { + time: 1408 + hash: 'FFBD9A00E05E085B89296D19D5CAEC57' + } + TestFrame { + time: 1424 + hash: '9C9D658B9C25602816B8066BF19105DB' + } + TestFrame { + time: 1440 + hash: '2B7FD058E6601E22A30BB7106B1C683B' + } + TestFrame { + time: 1456 + hash: 'F4C7E26B19EE0A3E7C9688685EB7BD05' + } + TestFrame { + time: 1472 + hash: '0DC6D593BCEFF56B7F81F2A49D37FEFB' + } + TestFrame { + time: 1488 + hash: '9BFD7AD5091CCBDDE43C593E133A7B10' + } + TestFrame { + time: 1504 + hash: '2703B617937914A90EA42EBF249D79EE' + } + TestFrame { + time: 1520 + hash: 'B77E2983138254016C4CCA53100F46FA' + } + TestFrame { + time: 1536 + hash: '60C4DD24187D1281081479E586F02B37' + } + TestFrame { + time: 1552 + hash: '62F2511ABD99EF1231C9FA4B91D4ABFE' + } + TestFrame { + time: 1568 + hash: 'E309B3353FD174E883D309571CADDC98' + } + TestFrame { + time: 1584 + hash: '1E2D6A134C7B12DDE551B148EF4F088C' + } + TestFrame { + time: 1600 + hash: 'E5DC5450604A491CC24A0DCF5C278B58' + } + TestFrame { + time: 1616 + hash: 'C8DAE97C10E1962C1E6A51AB3AB8579E' + } + TestFrame { + time: 1632 + hash: '4E1B7E06F55FB084080689B474F1FE1D' + } + TestFrame { + time: 1648 + hash: 'B4639C907FA937BF15FAC62421170CD8' + } + TestFrame { + time: 1664 + hash: 'C250208A0CAEB5F6CB4D3AAC3D7D350B' + } + TestFrame { + time: 1680 + hash: 'A73351EABECF0D71149EFE31F197413E' + } + TestFrame { + time: 1696 + hash: '479425F1B7AFF79E4DFB7FCA534AF018' + } + TestFrame { + time: 1712 + hash: '046D0F0040A52D1F26BA9F7C5DE06EF4' + } + TestFrame { + time: 1728 + hash: '655778BF13C6080903150B0EB43A7EDC' + } + TestFrame { + time: 1744 + hash: '72DA0BBE81514870655FDD3354ADAC60' + } + TestFrame { + time: 1760 + hash: 'DEFE0BDF675C65FFF55AAACED1E4DAE7' + } + TestFrame { + time: 1776 + hash: 'C988628B6C3D3780E9A865C7694926CD' + } + TestFrame { + time: 1792 + hash: '5AB17563655231089EDD986FF13D6012' + } + TestFrame { + time: 1808 + hash: 'C1ADFF1D2E5800ED466D1691D3B17382' + } + TestFrame { + time: 1824 + hash: '70129BA01FBB19592B9DC0D0A3B3E7DF' + } + TestFrame { + time: 1840 + hash: '0000829EF7ED908BF430D42904D59CC2' + } + TestFrame { + time: 1856 + hash: '843D2927F50AB87B4A86B7A6AAEED91F' + } + TestFrame { + time: 1872 + hash: 'DA86D21756025E7DE8050586D5E2A1F8' + } + TestFrame { + time: 1888 + hash: '48DD1BD6580133B0793FEE327EA4F1E6' + } + TestFrame { + time: 1904 + hash: 'F0618193DCD0BA2837249515A1898B1C' + } + TestFrame { + time: 1920 + hash: 'A530184E57251065286C0CBBA7301E9C' + } + TestFrame { + time: 1936 + hash: '64A1D7203973D65DD342793007A61C58' + } + TestFrame { + time: 1952 + hash: '5B830DFC6BA442772DE87D75D5A578DE' + } + TestFrame { + time: 1968 + hash: '5563B056B0409B65F60DD16DD0DD890E' + } + TestFrame { + time: 1984 + hash: 'B8BCF9AD2CA8720C11563A23D8280804' + } + TestFrame { + time: 2000 + hash: '8C0FCDA4F8956394C53FC4BA18CAA850' + } +} diff --git a/tests/auto/declarative/visual/colorAnimation/image0.png b/tests/auto/declarative/visual/colorAnimation/image0.png deleted file mode 100644 index 9e1caf7..0000000 Binary files a/tests/auto/declarative/visual/colorAnimation/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/colorAnimation/manifest.xml b/tests/auto/declarative/visual/colorAnimation/manifest.xml deleted file mode 100644 index 8e3de2e..0000000 --- a/tests/auto/declarative/visual/colorAnimation/manifest.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/declarative/visual/tst_visual.cpp b/tests/auto/declarative/visual/tst_visual.cpp index f077994..f540e62 100644 --- a/tests/auto/declarative/visual/tst_visual.cpp +++ b/tests/auto/declarative/visual/tst_visual.cpp @@ -25,7 +25,9 @@ void tst_visual::visual() { QVERIFY(!testdir.isEmpty()); - QFile configFile(QLatin1String(QT_TEST_SOURCE_DIR) + "/" + testdir + "/test"); + QString filename = QLatin1String(QT_TEST_SOURCE_DIR) + "/" + testdir + "/test"; + qWarning() << "Using config:" << filename; + QFile configFile(filename); QVERIFY(configFile.open(QIODevice::ReadOnly)); QString testfile = configFile.readLine().trimmed(); -- cgit v0.12 From 91a26a2ca6f592f88135fff672526ed9af628598 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 22 May 2009 08:23:46 +1000 Subject: Listview tests run. --- src/declarative/test/qfxtestobjects.cpp | 2 +- tests/auto/declarative/visual/ListView/basic1/basic1.qml | 4 ++-- .../visual/ListView/basic1/data/opengl/image0.png | Bin 3759 -> 0 bytes .../visual/ListView/basic1/data/opengl/manifest.xml | 4 ---- .../visual/ListView/basic1/data/raster/image0.png | Bin 0 -> 1737 bytes .../visual/ListView/basic1/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/ListView/basic1/test | 2 +- .../visual/ListView/basic2/data/opengl/image0.png | Bin 3759 -> 0 bytes .../visual/ListView/basic2/data/opengl/manifest.xml | 4 ---- .../visual/ListView/basic2/data/raster/image0.png | Bin 0 -> 1737 bytes .../visual/ListView/basic2/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/ListView/basic2/test | 2 +- .../visual/ListView/basic3/data/opengl/image0.png | Bin 3759 -> 0 bytes .../visual/ListView/basic3/data/opengl/manifest.xml | 4 ---- .../visual/ListView/basic3/data/raster/image0.png | Bin 0 -> 1737 bytes .../visual/ListView/basic3/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/ListView/basic3/test | 2 +- .../visual/ListView/basic4/data/opengl/image0.png | Bin 3759 -> 0 bytes .../visual/ListView/basic4/data/opengl/manifest.xml | 4 ---- .../visual/ListView/basic4/data/raster/image0.png | Bin 0 -> 1737 bytes .../visual/ListView/basic4/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/ListView/basic4/test | 2 +- 22 files changed, 31 insertions(+), 23 deletions(-) delete mode 100644 tests/auto/declarative/visual/ListView/basic1/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/ListView/basic1/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/ListView/basic1/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/ListView/basic1/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic2/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/ListView/basic2/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/ListView/basic2/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/ListView/basic2/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic3/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/ListView/basic3/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/ListView/basic3/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/ListView/basic3/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/ListView/basic4/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/ListView/basic4/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/ListView/basic4/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/ListView/basic4/data/raster/manifest.qml diff --git a/src/declarative/test/qfxtestobjects.cpp b/src/declarative/test/qfxtestobjects.cpp index 905e83e..5beefd9 100644 --- a/src/declarative/test/qfxtestobjects.cpp +++ b/src/declarative/test/qfxtestobjects.cpp @@ -143,7 +143,7 @@ void TestFullFrame::save(QTextStream &device, int pad) device << padding(pad) << QLatin1String("TestFullFrame {") << endl; device << padding(pad+4) << QLatin1String("time: ") << QLatin1String(QByteArray::number(time())) << endl; device << padding(pad+4) << QLatin1String("frameId: ") << QLatin1String(QByteArray::number(frameId())) << endl; - device << padding(pad) << padding(pad) << QLatin1String("}") << endl; + device << padding(pad) << QLatin1String("}") << endl; } TestMouse::TestMouse(QObject *parent) diff --git a/tests/auto/declarative/visual/ListView/basic1/basic1.qml b/tests/auto/declarative/visual/ListView/basic1/basic1.qml index 605457b..d9cd030 100644 --- a/tests/auto/declarative/visual/ListView/basic1/basic1.qml +++ b/tests/auto/declarative/visual/ListView/basic1/basic1.qml @@ -1,7 +1,7 @@ Rect { color: "blue" - width: 300 - height: 200 + width: 200 + height: 300 id: Page ListView { anchors.fill: parent diff --git a/tests/auto/declarative/visual/ListView/basic1/data/opengl/image0.png b/tests/auto/declarative/visual/ListView/basic1/data/opengl/image0.png deleted file mode 100644 index 403b407..0000000 Binary files a/tests/auto/declarative/visual/ListView/basic1/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/ListView/basic1/data/opengl/manifest.xml b/tests/auto/declarative/visual/ListView/basic1/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/ListView/basic1/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/ListView/basic1/data/raster/image0.png b/tests/auto/declarative/visual/ListView/basic1/data/raster/image0.png new file mode 100644 index 0000000..f8a4830 Binary files /dev/null and b/tests/auto/declarative/visual/ListView/basic1/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/ListView/basic1/data/raster/manifest.qml b/tests/auto/declarative/visual/ListView/basic1/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic1/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/ListView/basic1/test b/tests/auto/declarative/visual/ListView/basic1/test index 62f0665..49fcf5a 100644 --- a/tests/auto/declarative/visual/ListView/basic1/test +++ b/tests/auto/declarative/visual/ListView/basic1/test @@ -1 +1 @@ -basic1.xml +basic1.qml diff --git a/tests/auto/declarative/visual/ListView/basic2/data/opengl/image0.png b/tests/auto/declarative/visual/ListView/basic2/data/opengl/image0.png deleted file mode 100644 index 403b407..0000000 Binary files a/tests/auto/declarative/visual/ListView/basic2/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/ListView/basic2/data/opengl/manifest.xml b/tests/auto/declarative/visual/ListView/basic2/data/opengl/manifest.xml deleted file mode 100644 index f3fa6c9..0000000 --- a/tests/auto/declarative/visual/ListView/basic2/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/ListView/basic2/data/raster/image0.png b/tests/auto/declarative/visual/ListView/basic2/data/raster/image0.png new file mode 100644 index 0000000..f8a4830 Binary files /dev/null and b/tests/auto/declarative/visual/ListView/basic2/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/ListView/basic2/data/raster/manifest.qml b/tests/auto/declarative/visual/ListView/basic2/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic2/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/ListView/basic2/test b/tests/auto/declarative/visual/ListView/basic2/test index ae974fe..eb79495 100644 --- a/tests/auto/declarative/visual/ListView/basic2/test +++ b/tests/auto/declarative/visual/ListView/basic2/test @@ -1 +1 @@ -basic2.xml +basic2.qml diff --git a/tests/auto/declarative/visual/ListView/basic3/data/opengl/image0.png b/tests/auto/declarative/visual/ListView/basic3/data/opengl/image0.png deleted file mode 100644 index 403b407..0000000 Binary files a/tests/auto/declarative/visual/ListView/basic3/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/ListView/basic3/data/opengl/manifest.xml b/tests/auto/declarative/visual/ListView/basic3/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/ListView/basic3/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/ListView/basic3/data/raster/image0.png b/tests/auto/declarative/visual/ListView/basic3/data/raster/image0.png new file mode 100644 index 0000000..f8a4830 Binary files /dev/null and b/tests/auto/declarative/visual/ListView/basic3/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/ListView/basic3/data/raster/manifest.qml b/tests/auto/declarative/visual/ListView/basic3/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic3/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/ListView/basic3/test b/tests/auto/declarative/visual/ListView/basic3/test index ea3154e..9ec306b 100644 --- a/tests/auto/declarative/visual/ListView/basic3/test +++ b/tests/auto/declarative/visual/ListView/basic3/test @@ -1 +1 @@ -basic3.xml +basic3.qml diff --git a/tests/auto/declarative/visual/ListView/basic4/data/opengl/image0.png b/tests/auto/declarative/visual/ListView/basic4/data/opengl/image0.png deleted file mode 100644 index 403b407..0000000 Binary files a/tests/auto/declarative/visual/ListView/basic4/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/ListView/basic4/data/opengl/manifest.xml b/tests/auto/declarative/visual/ListView/basic4/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/ListView/basic4/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/ListView/basic4/data/raster/image0.png b/tests/auto/declarative/visual/ListView/basic4/data/raster/image0.png new file mode 100644 index 0000000..f8a4830 Binary files /dev/null and b/tests/auto/declarative/visual/ListView/basic4/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/ListView/basic4/data/raster/manifest.qml b/tests/auto/declarative/visual/ListView/basic4/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic4/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/ListView/basic4/test b/tests/auto/declarative/visual/ListView/basic4/test index 891e0be..2a7f227 100644 --- a/tests/auto/declarative/visual/ListView/basic4/test +++ b/tests/auto/declarative/visual/ListView/basic4/test @@ -1 +1 @@ -basic4.xml +basic4.qml -- cgit v0.12 From 494a53aec0ce4955027ff7c074039364285840a5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 22 May 2009 08:40:55 +1000 Subject: Repeater tests run. --- tests/auto/declarative/visual/repeater/basic1/basic1.qml | 4 ++-- .../visual/repeater/basic1/data/opengl/image0.png | Bin 3493 -> 0 bytes .../visual/repeater/basic1/data/opengl/manifest.xml | 4 ---- .../visual/repeater/basic1/data/raster/image0.png | Bin 0 -> 1287 bytes .../visual/repeater/basic1/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/repeater/basic1/test | 2 +- tests/auto/declarative/visual/repeater/basic2/basic2.qml | 4 ++-- .../visual/repeater/basic2/data/opengl/image0.png | Bin 3493 -> 0 bytes .../visual/repeater/basic2/data/opengl/manifest.xml | 4 ---- .../visual/repeater/basic2/data/raster/image0.png | Bin 0 -> 1287 bytes .../visual/repeater/basic2/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/repeater/basic2/test | 2 +- tests/auto/declarative/visual/repeater/basic3/basic3.qml | 4 ++-- .../visual/repeater/basic3/data/opengl/image0.png | Bin 3493 -> 0 bytes .../visual/repeater/basic3/data/opengl/manifest.xml | 4 ---- .../visual/repeater/basic3/data/raster/image0.png | Bin 0 -> 1287 bytes .../visual/repeater/basic3/data/raster/manifest.qml | 13 +++++++++++++ tests/auto/declarative/visual/repeater/basic3/test | 2 +- tests/auto/declarative/visual/repeater/basic4/basic4.qml | 4 ++-- .../visual/repeater/basic4/data/opengl/image0.png | Bin 3493 -> 0 bytes .../visual/repeater/basic4/data/opengl/manifest.xml | 4 ---- .../visual/repeater/basic4/data/raster/image0.png | Bin 0 -> 1287 bytes .../visual/repeater/basic4/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/repeater/basic4/test | 2 +- 24 files changed, 43 insertions(+), 28 deletions(-) delete mode 100644 tests/auto/declarative/visual/repeater/basic1/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/repeater/basic1/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/repeater/basic1/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/repeater/basic1/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic2/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/repeater/basic2/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/repeater/basic2/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/repeater/basic2/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic3/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/repeater/basic3/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/repeater/basic3/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/repeater/basic3/data/raster/manifest.qml delete mode 100644 tests/auto/declarative/visual/repeater/basic4/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/repeater/basic4/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/repeater/basic4/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/repeater/basic4/data/raster/manifest.qml diff --git a/tests/auto/declarative/visual/repeater/basic1/basic1.qml b/tests/auto/declarative/visual/repeater/basic1/basic1.qml index 3c66508..ba8f44d 100644 --- a/tests/auto/declarative/visual/repeater/basic1/basic1.qml +++ b/tests/auto/declarative/visual/repeater/basic1/basic1.qml @@ -1,7 +1,7 @@ Rect { color: "blue" - width: 800 - height: 600 + width: 300 + height: 200 id: Page HorizontalLayout { Repeater { diff --git a/tests/auto/declarative/visual/repeater/basic1/data/opengl/image0.png b/tests/auto/declarative/visual/repeater/basic1/data/opengl/image0.png deleted file mode 100644 index f0be97f..0000000 Binary files a/tests/auto/declarative/visual/repeater/basic1/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/repeater/basic1/data/opengl/manifest.xml b/tests/auto/declarative/visual/repeater/basic1/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/repeater/basic1/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/repeater/basic1/data/raster/image0.png b/tests/auto/declarative/visual/repeater/basic1/data/raster/image0.png new file mode 100644 index 0000000..868eaa3 Binary files /dev/null and b/tests/auto/declarative/visual/repeater/basic1/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/repeater/basic1/data/raster/manifest.qml b/tests/auto/declarative/visual/repeater/basic1/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic1/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/repeater/basic1/test b/tests/auto/declarative/visual/repeater/basic1/test index 62f0665..49fcf5a 100644 --- a/tests/auto/declarative/visual/repeater/basic1/test +++ b/tests/auto/declarative/visual/repeater/basic1/test @@ -1 +1 @@ -basic1.xml +basic1.qml diff --git a/tests/auto/declarative/visual/repeater/basic2/basic2.qml b/tests/auto/declarative/visual/repeater/basic2/basic2.qml index 1228be8..d975ea4 100644 --- a/tests/auto/declarative/visual/repeater/basic2/basic2.qml +++ b/tests/auto/declarative/visual/repeater/basic2/basic2.qml @@ -1,7 +1,7 @@ Rect { color: "blue" - width: 800 - height: 600 + width: 300 + height: 200 id: Page Component { id: Delegate diff --git a/tests/auto/declarative/visual/repeater/basic2/data/opengl/image0.png b/tests/auto/declarative/visual/repeater/basic2/data/opengl/image0.png deleted file mode 100644 index f0be97f..0000000 Binary files a/tests/auto/declarative/visual/repeater/basic2/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/repeater/basic2/data/opengl/manifest.xml b/tests/auto/declarative/visual/repeater/basic2/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/repeater/basic2/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/repeater/basic2/data/raster/image0.png b/tests/auto/declarative/visual/repeater/basic2/data/raster/image0.png new file mode 100644 index 0000000..868eaa3 Binary files /dev/null and b/tests/auto/declarative/visual/repeater/basic2/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/repeater/basic2/data/raster/manifest.qml b/tests/auto/declarative/visual/repeater/basic2/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic2/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/repeater/basic2/test b/tests/auto/declarative/visual/repeater/basic2/test index ae974fe..eb79495 100644 --- a/tests/auto/declarative/visual/repeater/basic2/test +++ b/tests/auto/declarative/visual/repeater/basic2/test @@ -1 +1 @@ -basic2.xml +basic2.qml diff --git a/tests/auto/declarative/visual/repeater/basic3/basic3.qml b/tests/auto/declarative/visual/repeater/basic3/basic3.qml index 7b8b9ef..cecba33 100644 --- a/tests/auto/declarative/visual/repeater/basic3/basic3.qml +++ b/tests/auto/declarative/visual/repeater/basic3/basic3.qml @@ -1,7 +1,7 @@ Rect { color: "blue" - width: 800 - height: 600 + width: 300 + height: 200 id: Page ListModel { id: DataSource diff --git a/tests/auto/declarative/visual/repeater/basic3/data/opengl/image0.png b/tests/auto/declarative/visual/repeater/basic3/data/opengl/image0.png deleted file mode 100644 index f0be97f..0000000 Binary files a/tests/auto/declarative/visual/repeater/basic3/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/repeater/basic3/data/opengl/manifest.xml b/tests/auto/declarative/visual/repeater/basic3/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/repeater/basic3/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/repeater/basic3/data/raster/image0.png b/tests/auto/declarative/visual/repeater/basic3/data/raster/image0.png new file mode 100644 index 0000000..868eaa3 Binary files /dev/null and b/tests/auto/declarative/visual/repeater/basic3/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/repeater/basic3/data/raster/manifest.qml b/tests/auto/declarative/visual/repeater/basic3/data/raster/manifest.qml new file mode 100644 index 0000000..47d36c3 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic3/data/raster/manifest.qml @@ -0,0 +1,13 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } + TestKey { + time: 1296 + type: 6 + modifiers: 0 + key: 16777251 + text: '' + } +} diff --git a/tests/auto/declarative/visual/repeater/basic3/test b/tests/auto/declarative/visual/repeater/basic3/test index ea3154e..9ec306b 100644 --- a/tests/auto/declarative/visual/repeater/basic3/test +++ b/tests/auto/declarative/visual/repeater/basic3/test @@ -1 +1 @@ -basic3.xml +basic3.qml diff --git a/tests/auto/declarative/visual/repeater/basic4/basic4.qml b/tests/auto/declarative/visual/repeater/basic4/basic4.qml index 2111c24..050a2c5 100644 --- a/tests/auto/declarative/visual/repeater/basic4/basic4.qml +++ b/tests/auto/declarative/visual/repeater/basic4/basic4.qml @@ -1,7 +1,7 @@ Rect { color: "blue" - width: 800 - height: 600 + width: 300 + height: 200 id: Page ListModel { id: DataSource diff --git a/tests/auto/declarative/visual/repeater/basic4/data/opengl/image0.png b/tests/auto/declarative/visual/repeater/basic4/data/opengl/image0.png deleted file mode 100644 index f0be97f..0000000 Binary files a/tests/auto/declarative/visual/repeater/basic4/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/repeater/basic4/data/opengl/manifest.xml b/tests/auto/declarative/visual/repeater/basic4/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/repeater/basic4/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/repeater/basic4/data/raster/image0.png b/tests/auto/declarative/visual/repeater/basic4/data/raster/image0.png new file mode 100644 index 0000000..868eaa3 Binary files /dev/null and b/tests/auto/declarative/visual/repeater/basic4/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/repeater/basic4/data/raster/manifest.qml b/tests/auto/declarative/visual/repeater/basic4/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic4/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/repeater/basic4/test b/tests/auto/declarative/visual/repeater/basic4/test index 891e0be..2a7f227 100644 --- a/tests/auto/declarative/visual/repeater/basic4/test +++ b/tests/auto/declarative/visual/repeater/basic4/test @@ -1 +1 @@ -basic4.xml +basic4.qml -- cgit v0.12 From cdd12bf1d4475ad23b49b5e27328bf6c738a0ab3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 22 May 2009 08:48:11 +1000 Subject: qfxtext test runs. --- .../visual/qfxtext/elide/data/opengl/image0.png | Bin 980 -> 0 bytes .../visual/qfxtext/elide/data/opengl/manifest.xml | 4 ---- .../visual/qfxtext/elide/data/raster/image0.png | Bin 0 -> 909 bytes .../visual/qfxtext/elide/data/raster/manifest.qml | 6 ++++++ tests/auto/declarative/visual/qfxtext/elide/test | 2 +- tools/qmlviewer/qmlviewer.cpp | 4 +++- 6 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 tests/auto/declarative/visual/qfxtext/elide/data/opengl/image0.png delete mode 100644 tests/auto/declarative/visual/qfxtext/elide/data/opengl/manifest.xml create mode 100644 tests/auto/declarative/visual/qfxtext/elide/data/raster/image0.png create mode 100644 tests/auto/declarative/visual/qfxtext/elide/data/raster/manifest.qml diff --git a/tests/auto/declarative/visual/qfxtext/elide/data/opengl/image0.png b/tests/auto/declarative/visual/qfxtext/elide/data/opengl/image0.png deleted file mode 100644 index 7d45407..0000000 Binary files a/tests/auto/declarative/visual/qfxtext/elide/data/opengl/image0.png and /dev/null differ diff --git a/tests/auto/declarative/visual/qfxtext/elide/data/opengl/manifest.xml b/tests/auto/declarative/visual/qfxtext/elide/data/opengl/manifest.xml deleted file mode 100644 index b784f42..0000000 --- a/tests/auto/declarative/visual/qfxtext/elide/data/opengl/manifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/tests/auto/declarative/visual/qfxtext/elide/data/raster/image0.png b/tests/auto/declarative/visual/qfxtext/elide/data/raster/image0.png new file mode 100644 index 0000000..05dc9ab Binary files /dev/null and b/tests/auto/declarative/visual/qfxtext/elide/data/raster/image0.png differ diff --git a/tests/auto/declarative/visual/qfxtext/elide/data/raster/manifest.qml b/tests/auto/declarative/visual/qfxtext/elide/data/raster/manifest.qml new file mode 100644 index 0000000..6d900f5 --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/data/raster/manifest.qml @@ -0,0 +1,6 @@ +TestLog { + TestFullFrame { + time: 0 + frameId: 0 + } +} diff --git a/tests/auto/declarative/visual/qfxtext/elide/test b/tests/auto/declarative/visual/qfxtext/elide/test index d35cbc9..bde7c7c 100644 --- a/tests/auto/declarative/visual/qfxtext/elide/test +++ b/tests/auto/declarative/visual/qfxtext/elide/test @@ -1 +1 @@ -elide.xml +elide.qml diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 0417539..2ef5616 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -266,8 +266,10 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); fileMenu->addSeparator(); fileMenu->addAction(quitAction); - if (menu) + if (menu) { menu->setFixedHeight(menu->sizeHint().height()); + menu->setMinimumWidth(10); + } } void QmlViewer::setScaleSkin() -- cgit v0.12 From 5a506eefe1ca8f654dcfc354f8ac39547510becf Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 22 May 2009 09:26:40 +1000 Subject: fix warnings --- src/declarative/debugger/qmlcanvasdebugger.cpp | 4 ++-- src/declarative/debugger/qmldebugger.cpp | 20 ++++++++++---------- src/declarative/debugger/qmlobjecttree.cpp | 4 ++-- src/declarative/debugger/qmlpropertyview.cpp | 2 +- src/declarative/fx/qfxitem.cpp | 2 ++ src/declarative/fx/qfxpathview.cpp | 1 + src/declarative/fx/qfxtext.cpp | 1 - src/declarative/fx/qfxvisualitemmodel.cpp | 2 +- src/declarative/qml/qmlcompositetypemanager.cpp | 4 ++-- src/declarative/qml/qmlcontext.cpp | 2 -- src/declarative/qml/qmlcustomparser.cpp | 1 + src/declarative/qml/qmlscriptparser.cpp | 13 +++++++------ 12 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/declarative/debugger/qmlcanvasdebugger.cpp b/src/declarative/debugger/qmlcanvasdebugger.cpp index fe57bf4..21abd2d 100644 --- a/src/declarative/debugger/qmlcanvasdebugger.cpp +++ b/src/declarative/debugger/qmlcanvasdebugger.cpp @@ -76,7 +76,7 @@ QmlCanvasDebugger::QmlCanvasDebugger(QmlWatches *w, QWidget *parent) QObject::connect(y, SIGNAL(valueChanged(int)), this, SLOT(setY(int))); hlayout->addWidget(x); hlayout->addWidget(y); - QPushButton *pb = new QPushButton("Refresh", this); + QPushButton *pb = new QPushButton(tr("Refresh"), this); QObject::connect(pb, SIGNAL(clicked()), this, SLOT(refresh())); hlayout->addWidget(pb); @@ -233,7 +233,7 @@ void QmlCanvasDebugger::setCanvas(QSimpleCanvas *canvas) return; QTreeWidgetItem *root = new QmlCanvasDebuggerItem(m_tree); - root->setText(0, "Root"); + root->setText(0, tr("Root")); root->setExpanded(true); clone(root, m_canvasRoot, m_debugCanvas->root()); } diff --git a/src/declarative/debugger/qmldebugger.cpp b/src/declarative/debugger/qmldebugger.cpp index 49ad8d9..0bbcb2c 100644 --- a/src/declarative/debugger/qmldebugger.cpp +++ b/src/declarative/debugger/qmldebugger.cpp @@ -85,7 +85,7 @@ QmlDebugger::QmlDebugger(QWidget *parent) QObject::connect(m_tree, SIGNAL(addWatch(QObject*,QString)), this, SLOT(addWatch(QObject*,QString))); vlayout->addWidget(m_tree); - QPushButton *pb = new QPushButton("Refresh", treeWid); + QPushButton *pb = new QPushButton(tr("Refresh"), treeWid); QObject::connect(pb, SIGNAL(clicked()), this, SLOT(refresh())); vlayout->addWidget(pb); @@ -93,28 +93,28 @@ QmlDebugger::QmlDebugger(QWidget *parent) m_text = new QPlainTextEdit(this); m_text->setReadOnly(true); - tabs->addTab(m_text, "File"); + tabs->addTab(m_text, tr("File")); m_warnings = new QTreeWidget(this); m_warnings->setHeaderHidden(true); - tabs->addTab(m_warnings, "Warnings"); + tabs->addTab(m_warnings, tr("Warnings")); m_watches = new QmlWatches(this); m_watchTable = new QTableView(this); m_watchTable->setSelectionMode(QTableWidget::NoSelection); m_watchTable->setModel(m_watches); - tabs->addTab(m_watchTable, "Watches"); + tabs->addTab(m_watchTable, tr("Watches")); m_properties = new QmlPropertyView(m_watches, this); QObject::connect(m_properties, SIGNAL(objectClicked(quint32)), this, SLOT(highlightObject(quint32))); - tabs->addTab(m_properties, "Properties"); + tabs->addTab(m_properties, tr("Properties")); tabs->setCurrentWidget(m_properties); m_canvas = new QmlCanvasDebugger(m_watches, this); QObject::connect(m_canvas, SIGNAL(objectClicked(quint32)), this, SLOT(highlightObject(quint32))); - tabs->addTab(m_canvas, "Canvas"); + tabs->addTab(m_canvas, tr("Canvas")); splitter->addWidget(tabs); splitter->setStretchFactor(1, 2); @@ -229,7 +229,7 @@ bool QmlDebugger::makeItem(QObject *obj, QmlDebuggerItem *item) if(QmlBindableValue *bv = qobject_cast(obj)) { QmlExpressionPrivate *p = bv->d; - text = bv->property().name() + ": " + bv->expression(); + text = bv->property().name() + QLatin1String(": ") + bv->expression(); item->setForeground(0, Qt::green); item->bindableValue = bv; @@ -281,13 +281,13 @@ bool QmlDebugger::makeItem(QObject *obj, QmlDebuggerItem *item) QString toolTipString; if(!p->url.toString().isEmpty()) { item->url = p->url; - toolTipString = "URL: " + p->url.toString(); + toolTipString = QLatin1String("URL: ") + p->url.toString(); } if(!p->typeName.isEmpty()) { if(!toolTipString.isEmpty()) - toolTipString.prepend("\n"); - toolTipString.prepend("Root type: " + text); + toolTipString.prepend(QLatin1Char('\n')); + toolTipString.prepend(tr("Root type: ") + text); text = p->typeName; } diff --git a/src/declarative/debugger/qmlobjecttree.cpp b/src/declarative/debugger/qmlobjecttree.cpp index fb6825a..27dc000 100644 --- a/src/declarative/debugger/qmlobjecttree.cpp +++ b/src/declarative/debugger/qmlobjecttree.cpp @@ -57,7 +57,7 @@ void QmlObjectTree::mousePressEvent(QMouseEvent *me) { QTreeWidget::mousePressEvent(me); if(me->button() == Qt::RightButton && me->type() == QEvent::MouseButtonPress) { - QAction action("Add watch...", 0); + QAction action(tr("Add watch..."), 0); QList actions; actions << &action; QmlDebuggerItem *item = static_cast(currentItem()); @@ -65,7 +65,7 @@ void QmlObjectTree::mousePressEvent(QMouseEvent *me) QMenu::exec(actions, me->globalPos())) { bool ok = false; - QString watch = QInputDialog::getText(this, "Watch expression", "Expression:", QLineEdit::Normal, QString(), &ok); + QString watch = QInputDialog::getText(this, tr("Watch expression"), tr("Expression:"), QLineEdit::Normal, QString(), &ok); if(ok && !watch.isEmpty()) emit addWatch(item->object, watch); diff --git a/src/declarative/debugger/qmlpropertyview.cpp b/src/declarative/debugger/qmlpropertyview.cpp index e32393c..0d34fd9 100644 --- a/src/declarative/debugger/qmlpropertyview.cpp +++ b/src/declarative/debugger/qmlpropertyview.cpp @@ -56,7 +56,7 @@ QmlPropertyView::QmlPropertyView(QmlWatches *watches, QWidget *parent) setLayout(layout); m_tree = new QTreeWidget(this); - m_tree->setHeaderLabels(QStringList() << "Property" << "Value"); + m_tree->setHeaderLabels(QStringList() << tr("Property") << tr("Value")); QObject::connect(m_tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem *))); QObject::connect(m_tree, SIGNAL(itemClicked(QTreeWidgetItem *, int)), diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 17fe36a..e5ede53 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1674,6 +1674,7 @@ void QFxItem::setKeepMouseGrab(bool keep) */ void QFxItem::activeFocusChanged(bool flag) { + Q_UNUSED(flag); emit activeFocusChanged(); } @@ -1683,6 +1684,7 @@ void QFxItem::activeFocusChanged(bool flag) */ void QFxItem::focusChanged(bool flag) { + Q_UNUSED(flag); emit focusChanged(); } diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index e315547..3f2e77a 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -744,6 +744,7 @@ void QFxPathView::createdItem(int index, QFxItem *item) void QFxPathView::destroyingItem(QFxItem *item) { + Q_UNUSED(item); } void QFxPathView::ticked() diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index e84255d..be90723 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -607,7 +607,6 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout) QImage QFxTextPrivate::wrappedTextImage(bool drawStyle) { //do layout - Q_Q(const QFxText); QFont f; if (_font) f = _font->font(); QSize size = cachedLayoutSize; diff --git a/src/declarative/fx/qfxvisualitemmodel.cpp b/src/declarative/fx/qfxvisualitemmodel.cpp index b9ddcb9..039998a 100644 --- a/src/declarative/fx/qfxvisualitemmodel.cpp +++ b/src/declarative/fx/qfxvisualitemmodel.cpp @@ -621,7 +621,7 @@ QVariant QFxVisualItemModel::evaluate(int index, const QString &expression, QObj int QFxVisualItemModel::indexOf(QFxItem *item, QObject *objectContext) const { - QmlExpression e(qmlContext(item), "index", objectContext); + QmlExpression e(qmlContext(item), QLatin1String("index"), objectContext); e.setTrackChange(false); QVariant value = e.value(); if (value.isValid()) diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp index e1124a6..0da1a92 100644 --- a/src/declarative/qml/qmlcompositetypemanager.cpp +++ b/src/declarative/qml/qmlcompositetypemanager.cpp @@ -315,7 +315,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) continue; } - QUrl url = engine->componentUrl(QUrl(type + ".qml"), QUrl(unit->url)); + QUrl url = engine->componentUrl(QUrl(QLatin1String(type + ".qml")), QUrl(unit->url)); QmlCompositeTypeData *urlUnit = components.value(url.toString()); if (!urlUnit) { @@ -335,7 +335,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) { QmlError error; error.setUrl(unit->url); - error.setDescription("Type " + type + " unavailable"); + error.setDescription(tr("Type %1 unavailable").arg(QLatin1String(type))); unit->errors << error; } if (urlUnit->errorType != QmlCompositeTypeData::AccessError) diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index ea72ebf..e5016f2 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -73,8 +73,6 @@ void QmlContextPrivate::dump(int depth) void QmlContextPrivate::destroyed(QObject *obj) { - Q_Q(QmlContext); - defaultObjects.removeAll(obj); QVariant variantObject = QVariant::fromValue(obj); diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index a60f783..2e8c8f6 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -224,6 +224,7 @@ QList QmlCustomParserProperty::assignedValues() const QByteArray QmlCustomParser::compile(const QList &, bool *ok) { + Q_UNUSED(ok); return QByteArray(); } diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 01600b9..5b3564f 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -10,6 +10,7 @@ #include "parser/javascriptast_p.h" #include +#include #include #include @@ -207,8 +208,8 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, { int lastTypeDot = objectType.lastIndexOf(QLatin1Char('.')); bool isType = !objectType.isEmpty() && - (objectType.at(0).isUpper() | - lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper()); + (objectType.at(0).isUpper() || + (lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper())); int propertyCount = 0; for (; propertyName; propertyName = propertyName->next){ @@ -221,7 +222,7 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName, if(propertyCount || !currentObject()) { QmlError error; - error.setDescription("Expected type name"); + error.setDescription(QCoreApplication::translate("QmlParser","Expected type name")); error.setLine(typeLocation.startLine); error.setColumn(typeLocation.startColumn); _parser->_errors << error; @@ -427,7 +428,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) if(!typeFound) { QmlError error; - error.setDescription("Expected property type"); + error.setDescription(QCoreApplication::translate("QmlParser","Expected property type")); error.setLine(node->typeToken.startLine); error.setColumn(node->typeToken.startColumn); _parser->_errors << error; @@ -573,7 +574,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) if(funDecl->formals) { QmlError error; - error.setDescription("Slot declarations must be parameterless"); + error.setDescription(QCoreApplication::translate("QmlParser","Slot declarations must be parameterless")); error.setLine(funDecl->lparenToken.startLine); error.setColumn(funDecl->lparenToken.startColumn); _parser->_errors << error; @@ -587,7 +588,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) obj->dynamicSlots << slot; } else { QmlError error; - error.setDescription("JavaScript declaration outside Script element"); + error.setDescription(QCoreApplication::translate("QmlParser","JavaScript declaration outside Script element")); error.setLine(node->firstSourceLocation().startLine); error.setColumn(node->firstSourceLocation().startColumn); _parser->_errors << error; -- cgit v0.12