summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/snippets/declarative/flipable.qml37
-rw-r--r--examples/declarative/animations/property-animation.qml4
-rw-r--r--examples/declarative/behaviors/SideRect.qml (renamed from examples/declarative/behaviours/SideRect.qml)7
-rw-r--r--examples/declarative/behaviors/behavior-example.qml (renamed from examples/declarative/behaviours/behavior-example.qml)45
-rw-r--r--examples/declarative/clocks/clocks.qml7
-rw-r--r--examples/declarative/clocks/content/Clock.qml4
-rw-r--r--examples/declarative/declarative.pro2
-rw-r--r--examples/declarative/flipable/back.pngbin5048 -> 0 bytes
-rw-r--r--examples/declarative/flipable/content/5_heart.pngbin0 -> 3872 bytes
-rw-r--r--examples/declarative/flipable/content/9_club.pngbin0 -> 6135 bytes
-rw-r--r--examples/declarative/flipable/content/Card.qml38
-rw-r--r--examples/declarative/flipable/content/back.pngbin0 -> 1418 bytes
-rw-r--r--examples/declarative/flipable/flipable-example.qml40
-rw-r--r--examples/declarative/flipable/front.pngbin6431 -> 0 bytes
-rw-r--r--examples/declarative/webview/alerts.html5
-rw-r--r--examples/declarative/webview/alerts.qml58
-rw-r--r--imports/.gitignore5
-rw-r--r--imports/Qt/.gitignore2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp46
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp1
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp59
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml44
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp39
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml20
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp36
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp26
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png)bin1563 -> 1563 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png)bin1570 -> 1570 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png)bin1553 -> 1553 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png)bin1563 -> 1563 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png)bin1569 -> 1569 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png)bin1569 -> 1569 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png)bin1566 -> 1566 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png)bin1566 -> 1566 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png)bin1567 -> 1567 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png)bin471 -> 471 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png)bin1454 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png)bin474 -> 474 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png)bin481 -> 481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png)bin479 -> 479 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml)5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml)11
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp6
-rw-r--r--tools/qml/main.cpp2
-rw-r--r--tools/qml/qdeclarativetester.cpp (renamed from tools/qml/qfxtester.cpp)8
-rw-r--r--tools/qml/qdeclarativetester.h (renamed from tools/qml/qfxtester.h)6
-rw-r--r--tools/qml/qml.pro4
-rw-r--r--tools/qml/qmlruntime.cpp2
76 files changed, 479 insertions, 119 deletions
diff --git a/doc/src/snippets/declarative/flipable.qml b/doc/src/snippets/declarative/flipable.qml
new file mode 100644
index 0000000..c837ebc
--- /dev/null
+++ b/doc/src/snippets/declarative/flipable.qml
@@ -0,0 +1,37 @@
+//! [0]
+import Qt 4.6
+
+Flipable {
+ id: flipable
+ width: 240
+ height: 240
+
+ property int angle: 0
+ property bool flipped: false
+
+ front: Image { source: "front.png" }
+ back: Image { source: "back.png" }
+
+ transform: Rotation {
+ origin.x: flipable.width/2; origin.y: flipable.height/2
+ axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
+ angle: flipable.angle
+ }
+
+ states: State {
+ name: "back"
+ PropertyChanges { target: flipable; angle: 180 }
+ when: flipable.flipped
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "angle"; duration: 1000 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: flipable.flipped = !flipable.flipped
+ }
+}
+//! [0]
+
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
index 401feb5..fd5eb3c 100644
--- a/examples/declarative/animations/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
@@ -40,7 +40,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
source: "images/face-smile.png"; y: minHeight
- // Animate the y property. Setting repeat to true makes the
+ // Animate the y property. Setting loops to Animation.Infinite makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
loops: Animation.Infinite
@@ -50,7 +50,7 @@ Item {
from: smiley.minHeight; to: smiley.maxHeight
easing.type: "OutExpo"; duration: 300
}
-
+
// Then move back to minHeight in 1 second, using the OutBounce easing function
NumberAnimation {
from: smiley.maxHeight; to: smiley.minHeight
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviors/SideRect.qml
index 63b7db2..7caac45 100644
--- a/examples/declarative/behaviours/SideRect.qml
+++ b/examples/declarative/behaviors/SideRect.qml
@@ -5,10 +5,9 @@ Rectangle {
property string text
- color: "black"
- width: 75; height: 50
- radius: 5
- border.width: 10; border.color: "white";
+ width: 75; height: 50; radius: 6
+ color: "#646464"; border.width: 4; border.color: "white"
+
MouseArea {
anchors.fill: parent
hoverEnabled: true
diff --git a/examples/declarative/behaviours/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml
index c84bf62..8da1ada 100644
--- a/examples/declarative/behaviours/behavior-example.qml
+++ b/examples/declarative/behaviors/behavior-example.qml
@@ -1,15 +1,14 @@
import Qt 4.6
Rectangle {
- color: "black"
- width: 400; height: 400
+ color: "#343434"
+ width: 600; height: 400
Rectangle {
- color: "transparent"
anchors.centerIn: parent
- width: 200; height: 200
- radius: 30
- border.width: 10; border.color: "white";
+ width: 200; height: 200; radius: 30
+ color: "transparent"; border.width: 4; border.color: "white"
+
SideRect {
id: leftRect
@@ -45,27 +44,35 @@ Rectangle {
property string text
- color: "red"
- width: 75; height: 50
- radius: 5
- border.width: 10; border.color: "white";
- x: 100-37; y: 100-25
- Behavior on x { NumberAnimation { duration: 300 } }
- Behavior on y { NumberAnimation { duration: 300 } }
+ color: "firebrick"
+ x: 62.5; y: 75; width: 75; height: 50
+ radius: 6; border.width: 4; border.color: "white"
+
+ // Setting an 'elastic' behavior on the focusRect's x property.
+ Behavior on x {
+ NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
+ // Setting an 'elastic' behavior on the focusRect's y property.
+ Behavior on y {
+ NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
Text {
id: focusText
- text: focusRect.text;
+ text: focusRect.text
+ anchors.centerIn: parent
+ color: "white"; font.pixelSize: 16; font.bold: true
+
+ // Setting a behavior on the focusText's x property:
+ // Set the opacity to 0, set the new text value, then set the opacity back to 1.
Behavior on text {
SequentialAnimation {
NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
- PropertyAction {}
+ PropertyAction { }
NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
}
}
- anchors.centerIn: parent;
- color: "white";
- font.pixelSize: 16
- font.bold: true
}
}
}
diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/clocks/clocks.qml
index 624748a..c5aa1dc 100644
--- a/examples/declarative/clocks/clocks.qml
+++ b/examples/declarative/clocks/clocks.qml
@@ -2,12 +2,11 @@ import Qt 4.6
import "content"
Rectangle {
- width: childrenRect.width
- height: childrenRect.height
+ width: 640; height: 240
color: "#646464"
- Grid {
- columns: 3
+ Row {
+ anchors.centerIn: parent
Clock { city: "New York"; shift: -4 }
Clock { city: "Mumbai"; shift: 5.5 }
Clock { city: "Tokyo"; shift: 9 }
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
index 75a1cf5..90c6be8 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -74,7 +74,7 @@ Item {
}
Text {
- id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white"
- anchors.horizontalCenter: parent.horizontalCenter
+ id: cityLabel; font.bold: true; font.pixelSize: 14; y: 200; color: "white"
+ anchors.horizontalCenter: parent.horizontalCenter; style: Text.Raised; styleColor: "black"
}
}
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
index 0f58738..5fc1cf0 100644
--- a/examples/declarative/declarative.pro
+++ b/examples/declarative/declarative.pro
@@ -12,7 +12,7 @@ SUBDIRS = \
sources.files = \
animations \
aspectratio \
- behaviours \
+ behaviors \
border-image \
clocks \
connections \
diff --git a/examples/declarative/flipable/back.png b/examples/declarative/flipable/back.png
deleted file mode 100644
index 0b4cafc..0000000
--- a/examples/declarative/flipable/back.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/flipable/content/5_heart.png b/examples/declarative/flipable/content/5_heart.png
new file mode 100644
index 0000000..fb59d81
--- /dev/null
+++ b/examples/declarative/flipable/content/5_heart.png
Binary files differ
diff --git a/examples/declarative/flipable/content/9_club.png b/examples/declarative/flipable/content/9_club.png
new file mode 100644
index 0000000..2545001
--- /dev/null
+++ b/examples/declarative/flipable/content/9_club.png
Binary files differ
diff --git a/examples/declarative/flipable/content/Card.qml b/examples/declarative/flipable/content/Card.qml
new file mode 100644
index 0000000..6b8fa69
--- /dev/null
+++ b/examples/declarative/flipable/content/Card.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Flipable {
+ id: container
+
+ property alias image: frontImage.source
+ property bool flipped: true
+ property int xAxis: 0
+ property int yAxis: 0
+ property int angle: 0
+
+ width: front.width; height: front.height; state: "back"
+
+ front: Image { id: frontImage; smooth: true }
+ back: Image { source: "back.png"; smooth: true }
+
+ MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
+
+ transform: Rotation {
+ id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
+ axis.x: container.xAxis; axis.y: container.yAxis; axis.z: 0
+ }
+
+ states: State {
+ name: "back"; when: container.flipped
+ PropertyChanges { target: rotation; angle: container.angle }
+ }
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { target: rotation; properties: "angle"; duration: 600 }
+ SequentialAnimation {
+ NumberAnimation { target: container; property: "scale"; to: 0.75; duration: 300 }
+ NumberAnimation { target: container; property: "scale"; to: 1.0; duration: 300 }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/flipable/content/back.png b/examples/declarative/flipable/content/back.png
new file mode 100644
index 0000000..f715d74
--- /dev/null
+++ b/examples/declarative/flipable/content/back.png
Binary files differ
diff --git a/examples/declarative/flipable/flipable-example.qml b/examples/declarative/flipable/flipable-example.qml
index c837ebc..eebc721 100644
--- a/examples/declarative/flipable/flipable-example.qml
+++ b/examples/declarative/flipable/flipable-example.qml
@@ -1,37 +1,13 @@
-//! [0]
import Qt 4.6
+import "content"
-Flipable {
- id: flipable
- width: 240
- height: 240
+Rectangle {
+ id: window; width: 480; height: 320
+ color: "darkgreen"
- property int angle: 0
- property bool flipped: false
-
- front: Image { source: "front.png" }
- back: Image { source: "back.png" }
-
- transform: Rotation {
- origin.x: flipable.width/2; origin.y: flipable.height/2
- axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
- angle: flipable.angle
- }
-
- states: State {
- name: "back"
- PropertyChanges { target: flipable; angle: 180 }
- when: flipable.flipped
- }
-
- transitions: Transition {
- NumberAnimation { properties: "angle"; duration: 1000 }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: flipable.flipped = !flipable.flipped
+ Row {
+ anchors.centerIn: parent; spacing: 30
+ Card { image: "content/9_club.png"; angle: 180; yAxis: 1 }
+ Card { image: "content/5_heart.png"; angle: 540; xAxis: 1 }
}
}
-//! [0]
-
diff --git a/examples/declarative/flipable/front.png b/examples/declarative/flipable/front.png
deleted file mode 100644
index 796b605..0000000
--- a/examples/declarative/flipable/front.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/webview/alerts.html b/examples/declarative/webview/alerts.html
new file mode 100644
index 0000000..82caddf
--- /dev/null
+++ b/examples/declarative/webview/alerts.html
@@ -0,0 +1,5 @@
+<html>
+<body onclick="alert('This is an alert')">
+<p>This is a web page. It fires an alert when clicked.
+</body>
+</html>
diff --git a/examples/declarative/webview/alerts.qml b/examples/declarative/webview/alerts.qml
new file mode 100644
index 0000000..ab2e860
--- /dev/null
+++ b/examples/declarative/webview/alerts.qml
@@ -0,0 +1,58 @@
+import Qt 4.6
+import org.webkit 1.0
+
+WebView {
+ id: webView
+ onAlert: popup.show(message)
+ width: 120
+ height: 150
+ url: "alerts.html"
+
+ Rectangle {
+ id: popup
+
+ color: "red"
+ border.color: "black"
+ border.width: 2
+ radius: 4
+
+ y: parent.height // off "screen"
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: label.width+5
+ height: label.height+5
+
+ opacity: 0
+
+ function show(t) {
+ label.text = t
+ popup.state = "visible"
+ timer.start()
+ }
+ states: State {
+ name: "visible"
+ PropertyChanges { target: popup; opacity: 1 }
+ PropertyChanges { target: popup; y: (webView.height-popup.height)/2 }
+ }
+
+ transitions: [
+ Transition { from: ""; PropertyAnimation { properties: "opacity,y"; duration: 65 } },
+ Transition { from: "visible"; PropertyAnimation { properties: "opacity,y"; duration: 500 } }
+ ]
+
+ Timer {
+ id: timer
+ interval: 1000
+ onTriggered: popup.state = ""
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ color: "white"
+ font.pixelSize: 20
+ width: webView.width*0.75
+ wrap: true
+ horizontalAlignment: "AlignHCenter"
+ }
+ }
+}
diff --git a/imports/.gitignore b/imports/.gitignore
new file mode 100644
index 0000000..3b18f12
--- /dev/null
+++ b/imports/.gitignore
@@ -0,0 +1,5 @@
+*.dll
+*.dso
+*.so
+*.so.debug
+qmldir
diff --git a/imports/Qt/.gitignore b/imports/Qt/.gitignore
deleted file mode 100644
index bc54bd5..0000000
--- a/imports/Qt/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.dll
-*.dso
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index e670d3e..ccefc70 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -75,7 +75,7 @@ public:
Here is a Flipable that flips whenever it is clicked:
- \snippet examples/declarative/flipable/flipable-example.qml 0
+ \snippet doc/src/snippets/declarative/flipable.qml 0
\image flipable.gif
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 12ede34..30f04f6 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -815,7 +815,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
if (snapMode != QDeclarativeGridView::SnapToRow && highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
data.flickTarget = maxExtent;
}
- if ((maxDistance > 0 || overShoot) && (snapMode != QDeclarativeGridView::NoSnap || highlightRange == QDeclarativeGridView::StrictlyEnforceRange)) {
+ if (maxDistance > 0 || overShoot) {
// This mode requires the grid to stop exactly on a row boundary.
qreal v = velocity;
if (maxVelocity != -1 && maxVelocity < qAbs(v)) {
@@ -1856,6 +1856,8 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
if (d->currentItem)
d->currentItem->index = d->currentIndex;
emit currentIndexChanged();
+ } else if (d->currentIndex < 0) {
+ d->updateCurrent(0);
}
emit countChanged();
return;
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 23a2350..3145c43 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -275,6 +275,10 @@ qreal QDeclarativeImage::paintedHeight() const
used by a loaded image. The image will be scaled down if its intrinsic size
is greater than this value.
+ If only one dimension of the size is set (and the other left at 0), the
+ unset dimension will be set in proportion to the set dimension to preserve
+ the source image aspect ratio. The fillMode is independent of this.
+
Unlike setting the width and height properties, which merely scale the painting
of the image, this property affects the number of pixels stored.
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 7bc74ce..97a22cf 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -130,7 +130,6 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativeTextEdit>("Qt",4,6,"TextEdit");
qmlRegisterType<QDeclarativeTextInput>("Qt",4,6,"TextInput");
qmlRegisterType<QDeclarativeViewSection>("Qt",4,6,"ViewSection");
- qmlRegisterType<QDeclarativeFlickableVisibleArea>("Qt",4,6,"VisibleArea");
qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,6,"VisualDataModel");
qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,6,"VisualItemModel");
@@ -148,6 +147,7 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativeVisualModel>();
qmlRegisterType<QAction>();
qmlRegisterType<QDeclarativePen>();
+ qmlRegisterType<QDeclarativeFlickableVisibleArea>();
#ifdef QT_WEBKIT_LIB
qmlRegisterType<QDeclarativeWebSettings>();
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index cbf8eac..308612f 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -305,7 +305,7 @@ public:
if (item->index == -1)
continue;
qreal itemTop = item->position();
- if (item->index == model->count()-1 || (itemTop+item->size()/2 >= pos))
+ if (itemTop+item->size()/2 >= pos && itemTop <= pos)
return item->position();
}
if (visibleItems.count()) {
@@ -1153,7 +1153,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
maxDistance = qAbs(minExtent - data.move.value());
}
}
- if (snapMode != QDeclarativeListView::SnapToItem && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
+ if (snapMode == QDeclarativeListView::NoSnap && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
data.flickTarget = minExtent;
} else {
if (data.move.value() > maxExtent) {
@@ -1164,10 +1164,10 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
maxDistance = qAbs(maxExtent - data.move.value());
}
}
- if (snapMode != QDeclarativeListView::SnapToItem && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
+ if (snapMode == QDeclarativeListView::NoSnap && highlightRange != QDeclarativeListView::StrictlyEnforceRange)
data.flickTarget = maxExtent;
}
- if ((maxDistance > 0 || overShoot) && (snapMode != QDeclarativeListView::NoSnap || highlightRange == QDeclarativeListView::StrictlyEnforceRange)) {
+ if (maxDistance > 0 || overShoot) {
// These modes require the list to stop exactly on an item boundary.
// The initial flick will estimate the boundary to stop on.
// Since list items can have variable sizes, the boundary will be
@@ -1183,18 +1183,35 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
// the initial flick - estimate boundary
qreal accel = deceleration;
qreal v2 = v * v;
- if (maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) {
- // + averageSize/4 to encourage moving at least one item in the flick direction
- qreal dist = v2 / (accel * 2.0) + averageSize/4;
- if (v > 0)
- dist = -dist;
+ overshootDist = 0.0;
+ // + averageSize/4 to encourage moving at least one item in the flick direction
+ qreal dist = v2 / (accel * 2.0) + averageSize/4;
+ if (maxDistance > 0)
+ dist = qMin(dist, maxDistance);
+ if (v > 0)
+ dist = -dist;
+ if ((maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) || snapMode == QDeclarativeListView::SnapOneItem) {
data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart;
+ if (overShoot) {
+ if (data.flickTarget >= minExtent) {
+ overshootDist = overShootDistance(v, vSize);
+ data.flickTarget += overshootDist;
+ } else if (data.flickTarget <= maxExtent) {
+ overshootDist = overShootDistance(v, vSize);
+ data.flickTarget -= overshootDist;
+ }
+ }
dist = -data.flickTarget + data.move.value();
accel = v2 / (2.0f * qAbs(dist));
- overshootDist = 0.0;
- } else {
- data.flickTarget = velocity > 0 ? minExtent : maxExtent;
- overshootDist = overShoot ? overShootDistance(v, vSize) : 0;
+ } else if (overShoot) {
+ data.flickTarget = data.move.value() - dist;
+ if (data.flickTarget >= minExtent) {
+ overshootDist = overShootDistance(v, vSize);
+ data.flickTarget += overshootDist;
+ } else if (data.flickTarget <= maxExtent) {
+ overshootDist = overShootDistance(v, vSize);
+ data.flickTarget -= overshootDist;
+ }
}
timeline.reset(data.move);
timeline.accel(data.move, v, accel, maxDistance + overshootDist);
@@ -2381,6 +2398,8 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
if (d->currentItem)
d->currentItem->index = d->currentIndex;
emit currentIndexChanged();
+ } else if (d->currentIndex < 0) {
+ d->updateCurrent(0);
}
emit countChanged();
return;
@@ -2743,7 +2762,6 @@ void QDeclarativeListView::destroyingItem(QDeclarativeItem *item)
void QDeclarativeListView::animStopped()
{
Q_D(QDeclarativeListView);
- d->moveReason = QDeclarativeListViewPrivate::Other;
d->bufferMode = QDeclarativeListViewPrivate::NoBuffer;
}
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index dde3366..6126a6f 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -640,6 +640,7 @@ bool QDeclarativeMouseArea::setPressed(bool p)
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
emit pressed(&me);
+ emit positionChanged(&me);
} else {
emit released(&me);
if (isclick)
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index bb742ee..3e570e5 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -81,6 +81,7 @@
#include <QDebug>
#include <QMetaObject>
#include <QStack>
+#include <QMap>
#include <QPluginLoader>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/qthreadstorage.h>
@@ -342,7 +343,8 @@ void QDeclarativeEnginePrivate::clear(SimpleList<QDeclarativeParserStatus> &pss)
}
Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer);
-Q_GLOBAL_STATIC(QSet<QString>, qmlEnginePluginsWithRegisteredTypes);
+typedef QMap<QString, QString> StringStringMap;
+Q_GLOBAL_STATIC(StringStringMap, qmlEnginePluginsWithRegisteredTypes); // stores the uri
void QDeclarativeEnginePrivate::init()
{
@@ -1788,7 +1790,13 @@ void QDeclarativeEngine::addImportPath(const QString& path)
if (qmlImportTrace())
qDebug() << "QDeclarativeEngine::addImportPath" << path;
Q_D(QDeclarativeEngine);
- d->fileImportPath.prepend(path);
+ QUrl url = QUrl(path);
+ if (url.isRelative() || url.scheme() == QString::fromLocal8Bit("file")) {
+ QDir dir = QDir(path);
+ d->fileImportPath.prepend(dir.canonicalPath());
+ } else {
+ d->fileImportPath.prepend(path);
+ }
}
@@ -1838,34 +1846,43 @@ bool QDeclarativeEngine::importExtension(const QString &fileName, const QString
qDebug() << "QDeclarativeEngine::importExtension" << uri << "from" << fileName;
QFileInfo fileInfo(fileName);
const QString absoluteFilePath = fileInfo.absoluteFilePath();
- QPluginLoader loader(absoluteFilePath);
- if (QDeclarativeExtensionInterface *iface = qobject_cast<QDeclarativeExtensionInterface *>(loader.instance())) {
- const QByteArray bytes = uri.toUtf8();
- const char *moduleId = bytes.constData();
+ QDeclarativeEnginePrivate *d = QDeclarativeEnginePrivate::get(this);
+ bool engineInitialized = d->initializedPlugins.contains(absoluteFilePath);
+ bool typesRegistered = qmlEnginePluginsWithRegisteredTypes()->contains(absoluteFilePath);
- // ### this code should probably be protected with a mutex.
- if (! qmlEnginePluginsWithRegisteredTypes()->contains(absoluteFilePath)) {
- // types should only be registered once (they're global).
+ if (typesRegistered) {
+ Q_ASSERT_X(qmlEnginePluginsWithRegisteredTypes()->value(absoluteFilePath) == uri,
+ "QDeclarativeEngine::importExtension",
+ "Internal error: Plugin imported previously with different uri");
+ }
- qmlEnginePluginsWithRegisteredTypes()->insert(absoluteFilePath);
- iface->registerTypes(moduleId);
- }
+ if (!engineInitialized || !typesRegistered) {
+ QPluginLoader loader(absoluteFilePath);
- QDeclarativeEnginePrivate *d = QDeclarativeEnginePrivate::get(this);
+ if (QDeclarativeExtensionInterface *iface = qobject_cast<QDeclarativeExtensionInterface *>(loader.instance())) {
- if (! d->initializedPlugins.contains(absoluteFilePath)) {
- // things on the engine (eg. adding new global objects) have to be done for every engine.
+ const QByteArray bytes = uri.toUtf8();
+ const char *moduleId = bytes.constData();
+ if (!typesRegistered) {
- // protect against double initialization
- d->initializedPlugins.insert(absoluteFilePath);
- iface->initializeEngine(this, moduleId);
- }
+ // ### this code should probably be protected with a mutex.
+ qmlEnginePluginsWithRegisteredTypes()->insert(absoluteFilePath, uri);
+ iface->registerTypes(moduleId);
+ }
+ if (!engineInitialized) {
+ // things on the engine (eg. adding new global objects) have to be done for every engine.
- return true;
+ // protect against double initialization
+ d->initializedPlugins.insert(absoluteFilePath);
+ iface->initializeEngine(this, moduleId);
+ }
+ } else {
+ return false;
+ }
}
- return false;
+ return true;
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index e5471b0..20c9faa 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -11054,7 +11054,7 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
&newEffectTransform, false, true);
} else if (deviceCoordinates) {
// Device coordinates with info.
- scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, info->exposedRegion,
+ scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, 0,
info->widget, info->opacity, &effectTransform, info->wasDirtySceneTransform,
info->drawItem);
} else {
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index be3fca2..1ff1078 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -1218,6 +1218,14 @@ QString QDeclarativeWebPage::chooseFile(QWebFrame *originatingFrame, const QStri
return oldFile;
}
+/*!
+ \qmlsignal WebView::alert(message)
+
+ This signal is emitted when the web engine sends a JavaScript alert. The \a message is the text
+ to be displayed in the alert to the user.
+*/
+
+
void QDeclarativeWebPage::javaScriptAlert(QWebFrame *originatingFrame, const QString& msg)
{
Q_UNUSED(originatingFrame)
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
new file mode 100644
index 0000000..2fec9da
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml
@@ -0,0 +1,44 @@
+import Qt 4.6
+
+QtObject {
+ //real
+ property real test1: a + b
+ property real test2: a - b
+ property bool test3: (a < b)
+ property bool test4: (a > b)
+ property bool test5: (a == b)
+ property bool test6: (a != b)
+
+ //int
+ property int test7: c + d
+ property int test8: d - c
+ property bool test9: (c < d)
+ property bool test10: (c > d)
+ property bool test11: (c == d)
+ property bool test12: (c != d)
+
+ //string
+ property string test13: e + f
+ property string test14: e + " " + f
+ property bool test15: (e == f)
+ property bool test16: (e != f)
+
+ //type conversion
+ property int test17: a
+ property real test18: d
+ property int test19: g
+ property real test20: g
+ property string test21: g
+ property string test22: h
+ property bool test23: i
+
+ property real a: 4.5
+ property real b: 11.2
+ property int c: 9
+ property int d: 176
+ property string e: "Hello"
+ property string f: "World"
+ property var g: 6.7
+ property var h: "!"
+ property var i: true
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index b218d30..77dd4b8 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -129,6 +129,7 @@ private slots:
void ownership();
void qlistqobjectMethods();
void strictlyEquals();
+ void compiled();
void bug1();
void dynamicCreationCrash();
@@ -2026,6 +2027,44 @@ void tst_qdeclarativeecmascript::strictlyEquals()
delete object;
}
+void tst_qdeclarativeecmascript::compiled()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("compiled.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test1").toReal(), qreal(15.7));
+ QCOMPARE(object->property("test2").toReal(), qreal(-6.7));
+ QCOMPARE(object->property("test3").toBool(), true);
+ QCOMPARE(object->property("test4").toBool(), false);
+ QCOMPARE(object->property("test5").toBool(), false);
+ QCOMPARE(object->property("test6").toBool(), true);
+
+ QCOMPARE(object->property("test7").toInt(), 185);
+ QCOMPARE(object->property("test8").toInt(), 167);
+ QCOMPARE(object->property("test9").toBool(), true);
+ QCOMPARE(object->property("test10").toBool(), false);
+ QCOMPARE(object->property("test11").toBool(), false);
+ QCOMPARE(object->property("test12").toBool(), true);
+
+ QCOMPARE(object->property("test13").toString(), QLatin1String("HelloWorld"));
+ QCOMPARE(object->property("test14").toString(), QLatin1String("Hello World"));
+ QCOMPARE(object->property("test15").toBool(), false);
+ QCOMPARE(object->property("test16").toBool(), true);
+
+ QCOMPARE(object->property("test17").toInt(), 4);
+ QCOMPARE(object->property("test18").toReal(), qreal(176));
+ QEXPECT_FAIL("", "QTBUG-9538", Continue);
+ QCOMPARE(object->property("test19").toInt(), 6);
+ QCOMPARE(object->property("test20").toReal(), qreal(6.7));
+ QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
+ QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
+ QCOMPARE(object->property("test23").toBool(), true);
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
index 879047e..412c3b7 100644
--- a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
+++ b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
@@ -130,7 +130,7 @@ void tst_QDeclarativeLayouts::test_qml()
void tst_QDeclarativeLayouts::test_cpp()
{
- //TODO: Waiting on QT-2407 to write this test
+ //TODO: This test!
}
QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename)
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
new file mode 100644
index 0000000..0da7c45
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Rectangle {
+ color: "#ffffff"
+ width: 320; height: 240
+ MouseArea {
+ id: mouseRegion
+ objectName: "mouseregion"
+ anchors.fill: parent
+ Rectangle {
+ id: ball
+ objectName: "ball"
+ width: 20; height: 20
+ radius: 10
+ color: "#0000ff"
+ x: { mouseRegion.mouseX }
+ y: mouseRegion.mouseY
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 769cf32..9b664e5 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include <QtTest/QSignalSpy>
#include <private/qdeclarativemousearea_p.h>
+#include <private/qdeclarativerectangle_p.h>
#include <QtDeclarative/qdeclarativeview.h>
class tst_QDeclarativeMouseArea: public QObject
@@ -49,6 +50,7 @@ class tst_QDeclarativeMouseArea: public QObject
Q_OBJECT
private slots:
void dragProperties();
+ void updateMouseAreaPosOnClick();
private:
QDeclarativeView *createView(const QString &filename);
};
@@ -121,6 +123,8 @@ void tst_QDeclarativeMouseArea::dragProperties()
QCOMPARE(xmaxSpy.count(),1);
QCOMPARE(yminSpy.count(),1);
QCOMPARE(ymaxSpy.count(),1);
+
+ delete canvas;
}
QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
@@ -133,6 +137,38 @@ QDeclarativeView *tst_QDeclarativeMouseArea::createView(const QString &filename)
return canvas;
}
+void tst_QDeclarativeMouseArea::updateMouseAreaPosOnClick()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/updateMousePosOnClick.qml");
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild<QDeclarativeMouseArea*>("mouseregion");
+ QVERIFY(mouseRegion != 0);
+
+ QDeclarativeRectangle *rect = canvas->rootObject()->findChild<QDeclarativeRectangle*>("ball");
+ QVERIFY(rect != 0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+ event.setScenePos(QPointF(100, 100));
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &event);
+
+ QCOMPARE(mouseRegion->mouseX(), 100.0);
+ QCOMPARE(mouseRegion->mouseY(), 100.0);
+
+ QCOMPARE(mouseRegion->mouseX(), rect->x());
+ QCOMPARE(mouseRegion->mouseY(), rect->y());
+
+ delete canvas;
+}
+
QTEST_MAIN(tst_QDeclarativeMouseArea)
#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
new file mode 100644
index 0000000..70bd74d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ Component.onCompleted: Qt.openUrlExternally("test:url")
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 4987557..48d5235 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -44,6 +44,7 @@
#include <QDeclarativeEngine>
#include <QFileInfo>
#include <QDeclarativeComponent>
+#include <QDesktopServices>
#include <QDir>
#include <QVector3D>
#include <QCryptographicHash>
@@ -261,10 +262,31 @@ void tst_qdeclarativeqt::tint()
delete object;
}
+class MyUrlHandler : public QObject
+{
+ Q_OBJECT
+public:
+ MyUrlHandler() : called(0) { }
+ int called;
+ QUrl last;
+
+public slots:
+ void noteCall(const QUrl &url) { called++; last = url; }
+};
+
void tst_qdeclarativeqt::openUrlExternally()
{
- QEXPECT_FAIL("", "How do we test this?", Abort);
- QVERIFY(false);
+ MyUrlHandler handler;
+
+ QDesktopServices::setUrlHandler("test", &handler, "noteCall");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("openUrlExternally.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(handler.called,1);
+ QCOMPARE(handler.last, QUrl("test:url"));
+
+ QDesktopServices::unsetUrlHandler("test");
}
void tst_qdeclarativeqt::md5()
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
index cf36d60..cf36d60 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
index 6069df8..6069df8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
index b8bd5f3..b8bd5f3 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
index cf36d60..cf36d60 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
index 831d6b4..831d6b4 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
index f7079dc..f7079dc 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
index a5f4451..a5f4451 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
index e1261d0..e1261d0 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png
index 653905e..653905e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.8.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
index 5a131e9..5a131e9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
index cc374fd..cc374fd 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png
index c249c21..c249c21 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.0.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.1.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.10.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.10.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.11.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.11.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.12.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.12.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.13.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.13.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.14.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.14.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png
index e797cc9..e797cc9 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.15.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.15.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.16.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.16.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.17.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.17.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.18.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.18.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.19.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.19.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.2.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.20.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.20.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.21.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.21.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png
index 7951309..7951309 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.22.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.22.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png
index a96bf1b..a96bf1b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.3.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.4.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.5.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.5.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.6.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.6.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png
index 1fe365a..1fe365a 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.7.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.7.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.8.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.8.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png
index 7420ca7..7420ca7 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/data/mouseregion.9.png
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mouseregion.9.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
index dbb2a24..21c46d8 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/drag.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml
@@ -1,5 +1,10 @@
import Qt 4.6
+/*
+this test shows a blue box being dragged around -- first roughly tracing the
+borders of the window, then doing a rough 'x'-shape, then moving to around the middle.
+*/
+
Rectangle{
width:400
height:440
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
index 3c722d0..3019006 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemouseregion/mouseregion.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml
@@ -1,5 +1,16 @@
import Qt 4.6
+/*
+This test displays 6 red rects -- 4 in the top row, 2 in the bottom.
+
+Sequence:
+1. the bottom-left rect turns blue, then green
+2. the second rect in the top row turns blue
+3. the third rect in the top row turns blue
+4. the last rect in the top row quickly turns blue then back to red
+5. the bottom-left rect turns blue, then green
+*/
+
Rectangle {
id: root
width: 400
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 2794ab8..91f8486 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -101,6 +101,8 @@ void tst_qmlvisual::visual_data()
files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
else {
//these are tests we think are stable and useful enough to be run by the CI system
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/mousearea-visual.qml";
+ files << QT_TEST_SOURCE_DIR "/qdeclarativemousearea/drag.qml";
files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/parentAnimation/parentAnimation-visual.qml";
files << QT_TEST_SOURCE_DIR "/animation/reanchor/reanchor.qml";
@@ -124,6 +126,10 @@ void tst_qmlvisual::visual()
arguments << "-script" << testdata
<< "-scriptopts" << "play,testimages,testerror,exitoncomplete,exitonfailure"
<< file << "-graphicssystem" << "raster";
+#ifdef Q_WS_QWS
+ arguments << "-qws";
+#endif
+
QProcess p;
p.start(qmlruntime, arguments);
QVERIFY(p.waitForFinished());
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 8062e8e..5099e49 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -47,7 +47,7 @@
#include <QApplication>
#include <QTranslator>
#include <QDebug>
-#include "qfxtester.h"
+#include "qdeclarativetester.h"
#include "qdeclarativefolderlistmodel.h"
QT_USE_NAMESPACE
diff --git a/tools/qml/qfxtester.cpp b/tools/qml/qdeclarativetester.cpp
index 28bbf5e..6245124 100644
--- a/tools/qml/qfxtester.cpp
+++ b/tools/qml/qdeclarativetester.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <qfxtester.h>
+#include <qdeclarativetester.h>
#include <QDebug>
#include <QApplication>
#include <qdeclarativeview.h>
@@ -311,9 +311,9 @@ void QDeclarativeTester::updateCurrentTime(int msec)
} else if (frame->msec() == msec) {
if (!frame->hash().isEmpty() && frame->hash().toUtf8() != fe.hash.toHex()) {
if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
- qWarning() << "QDeclarativeTester: Mismatched frame hash. Seen:"
- << fe.hash.toHex() << "Expected:"
- << frame->hash().toUtf8();
+ qWarning() << "QDeclarativeTester: Mismatched frame hash at" << msec
+ << ". Seen:" << fe.hash.toHex()
+ << "Expected:" << frame->hash().toUtf8();
imagefailure();
}
}
diff --git a/tools/qml/qfxtester.h b/tools/qml/qdeclarativetester.h
index 6521409..d49c9b8 100644
--- a/tools/qml/qfxtester.h
+++ b/tools/qml/qdeclarativetester.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFXTESTER_H
-#define QFXTESTER_H
+#ifndef QDECLARATIVETESTER_H
+#define QDECLARATIVETESTER_H
#include <QEvent>
#include <QMouseEvent>
@@ -283,4 +283,4 @@ private:
QT_END_NAMESPACE
-#endif // QFXTESTER_H
+#endif // QDECLARATIVETESTER_H
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index a7eb6f5..ba283b6 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -15,13 +15,13 @@ contains(QT_CONFIG, opengl) {
# Input
HEADERS += qmlruntime.h \
proxysettings.h \
- qfxtester.h \
+ qdeclarativetester.h \
deviceorientation.h \
qdeclarativefolderlistmodel.h
SOURCES += main.cpp \
qmlruntime.cpp \
proxysettings.cpp \
- qfxtester.cpp \
+ qdeclarativetester.cpp \
qdeclarativefolderlistmodel.cpp
RESOURCES = qmlruntime.qrc
maemo5 {
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 44cab97..1ab528e 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -95,7 +95,7 @@
#include <QGLWidget>
#endif
-#include <qfxtester.h>
+#include <qdeclarativetester.h>
#if defined (Q_OS_SYMBIAN)
#define SYMBIAN_NETWORK_INIT