summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-23 04:27:13 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-23 04:27:13 (GMT)
commit62b51f36c41fdef46b785d8f3a9443c016a9263a (patch)
treefb6878c5036de4d76a5a19011b9531ef5949a437
parent3c4df26a8d184b728395c8aad26b05626176b7b5 (diff)
downloadQt-62b51f36c41fdef46b785d8f3a9443c016a9263a.zip
Qt-62b51f36c41fdef46b785d8f3a9443c016a9263a.tar.gz
Qt-62b51f36c41fdef46b785d8f3a9443c016a9263a.tar.bz2
Use console.log, not print
-rw-r--r--examples/declarative/behaviours/test.qml2
-rw-r--r--examples/declarative/extending/binding/example.qml2
-rw-r--r--examples/declarative/extending/signal/example.qml2
-rw-r--r--examples/declarative/extending/valuesource/example.qml2
-rw-r--r--examples/declarative/focusscope/test.qml10
-rw-r--r--examples/declarative/focusscope/test3.qml4
-rw-r--r--examples/declarative/focusscope/test4.qml10
-rw-r--r--examples/declarative/mouseregion/mouse.qml24
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml2
-rw-r--r--examples/declarative/xmldata/daringfireball.qml2
-rw-r--r--examples/declarative/xmldata/yahoonews.qml2
-rw-r--r--examples/declarative/xmlhttprequest/test.qml18
12 files changed, 40 insertions, 40 deletions
diff --git a/examples/declarative/behaviours/test.qml b/examples/declarative/behaviours/test.qml
index 4a44fd7..1869c45 100644
--- a/examples/declarative/behaviours/test.qml
+++ b/examples/declarative/behaviours/test.qml
@@ -7,7 +7,7 @@ Rectangle {
id: page
MouseRegion {
anchors.fill: parent
- onClicked: { bluerect.parent = page; print(mouseX); bluerect.x = mouseX; }
+ onClicked: { bluerect.parent = page; console.log(mouseX); bluerect.x = mouseX; }
}
MyRect {
color: "green"
diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml
index 352bb70..b66bc86 100644
--- a/examples/declarative/extending/binding/example.qml
+++ b/examples/declarative/extending/binding/example.qml
@@ -11,7 +11,7 @@ BirthdayParty {
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
// ![0]
- onPartyStarted: print("This party started rockin' at " + time);
+ onPartyStarted: console.log("This party started rockin' at " + time);
Boy {
diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml
index e46bf32..c7d4792 100644
--- a/examples/declarative/extending/signal/example.qml
+++ b/examples/declarative/extending/signal/example.qml
@@ -2,7 +2,7 @@ import People 1.0
// ![0]
BirthdayParty {
- onPartyStarted: print("This party started rockin' at " + time);
+ onPartyStarted: console.log("This party started rockin' at " + time);
// ![0]
celebrant: Boy {
diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml
index 6d47350..7cdf8c0 100644
--- a/examples/declarative/extending/valuesource/example.qml
+++ b/examples/declarative/extending/valuesource/example.qml
@@ -5,7 +5,7 @@ BirthdayParty {
speaker: HappyBirthday { name: "Bob Jones" }
// ![0]
- onPartyStarted: print("This party started rockin' at " + time);
+ onPartyStarted: console.log("This party started rockin' at " + time);
celebrant: Boy {
diff --git a/examples/declarative/focusscope/test.qml b/examples/declarative/focusscope/test.qml
index ab5a143..e4332e7 100644
--- a/examples/declarative/focusscope/test.qml
+++ b/examples/declarative/focusscope/test.qml
@@ -5,13 +5,13 @@ Rectangle {
width: 800
height: 600
- Keys.onDigit9Pressed: print("Error - Root")
+ Keys.onDigit9Pressed: console.log("Error - Root")
FocusScope {
id: myScope
focus: true
- Keys.onDigit9Pressed: print("Error - FocusScope")
+ Keys.onDigit9Pressed: console.log("Error - FocusScope")
Rectangle {
height: 120
@@ -27,7 +27,7 @@ Rectangle {
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: print("Top Left");
+ Keys.onDigit9Pressed: console.log("Top Left");
KeyNavigation.right: item2
focus: true
@@ -44,7 +44,7 @@ Rectangle {
border.width: 5
border.color: wantsFocus?"blue":"black"
KeyNavigation.left: item1
- Keys.onDigit9Pressed: print("Top Right");
+ Keys.onDigit9Pressed: console.log("Top Right");
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
@@ -64,7 +64,7 @@ Rectangle {
border.width: 5
border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: print("Bottom Left");
+ Keys.onDigit9Pressed: console.log("Bottom Left");
KeyNavigation.up: myScope
Rectangle {
diff --git a/examples/declarative/focusscope/test3.qml b/examples/declarative/focusscope/test3.qml
index 1b3181b..9344d07 100644
--- a/examples/declarative/focusscope/test3.qml
+++ b/examples/declarative/focusscope/test3.qml
@@ -23,10 +23,10 @@ Rectangle {
FocusScope {
id: root
width: 50; height: 50;
- Keys.onDigit9Pressed: print("Error - " + name)
+ Keys.onDigit9Pressed: console.log("Error - " + name)
Rectangle {
focus: true
- Keys.onDigit9Pressed: print(name)
+ Keys.onDigit9Pressed: console.log(name)
width: 50; height: 50;
color: root.ListView.isCurrentItem?"red":"green"
Text { text: name; anchors.centerIn: parent }
diff --git a/examples/declarative/focusscope/test4.qml b/examples/declarative/focusscope/test4.qml
index 5d4fe35..cc96df9 100644
--- a/examples/declarative/focusscope/test4.qml
+++ b/examples/declarative/focusscope/test4.qml
@@ -5,12 +5,12 @@ Rectangle {
width: 800
height: 600
- Keys.onDigit9Pressed: print("Error - Root")
+ Keys.onDigit9Pressed: console.log("Error - Root")
FocusScope {
id: myScope
- Keys.onDigit9Pressed: print("Error - FocusScope")
+ Keys.onDigit9Pressed: console.log("Error - FocusScope")
Rectangle {
height: 120
@@ -26,7 +26,7 @@ Rectangle {
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: print("Error - Top Left");
+ Keys.onDigit9Pressed: console.log("Error - Top Left");
KeyNavigation.right: item2
focus: true
@@ -43,7 +43,7 @@ Rectangle {
border.width: 5
border.color: wantsFocus?"blue":"black"
KeyNavigation.left: item1
- Keys.onDigit9Pressed: print("Error - Top Right");
+ Keys.onDigit9Pressed: console.log("Error - Top Right");
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
@@ -63,7 +63,7 @@ Rectangle {
border.width: 5
border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: print("Error - Bottom Left");
+ Keys.onDigit9Pressed: console.log("Error - Bottom Left");
KeyNavigation.up: myScope
Rectangle {
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml
index 91f3b6e..d07d471 100644
--- a/examples/declarative/mouseregion/mouse.qml
+++ b/examples/declarative/mouseregion/mouse.qml
@@ -10,13 +10,13 @@ Rectangle {
MouseRegion {
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
- onPressed: { print('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
- onReleased: { print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
- onClicked: { print('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') }
- onDoubleClicked: { print('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') }
- onPressAndHold: { print('press and hold') }
- onEntered: { print('entered ' + pressed) }
- onExited: { print('exited ' + pressed) }
+ onPressed: { console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
+ onReleased: { console.log('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
+ onClicked: { console.log('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') }
+ onDoubleClicked: { console.log('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') }
+ onPressAndHold: { console.log('press and hold') }
+ onEntered: { console.log('entered ' + pressed) }
+ onExited: { console.log('exited ' + pressed) }
anchors.fill: parent
}
}
@@ -29,11 +29,11 @@ Rectangle {
drag.axis: "XAxis"
drag.minimumX: 0
drag.maximumX: 150
- onPressed: { print('press') }
- onReleased: { print('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') }
- onClicked: { print('click' + '(wasHeld: ' + mouse.wasHeld + ')') }
- onDoubleClicked: { print('double click') }
- onPressAndHold: { print('press and hold') }
+ onPressed: { console.log('press') }
+ onReleased: { console.log('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') }
+ onClicked: { console.log('click' + '(wasHeld: ' + mouse.wasHeld + ')') }
+ onDoubleClicked: { console.log('double click') }
+ onPressAndHold: { console.log('press and hold') }
anchors.fill: parent
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
index 289579a..fad2175 100644
--- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -24,7 +24,7 @@ Rectangle {
anchors.bottom: Screen.bottom
Button {
- id: btnA; text: "New Game"; onClicked: print("Implement me!");
+ id: btnA; text: "New Game"; onClicked: console.log("Implement me!");
anchors.left: parent.left; anchors.leftMargin: 3
anchors.verticalCenter: parent.verticalCenter
}
diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml
index 938bdd5..456f309 100644
--- a/examples/declarative/xmldata/daringfireball.qml
+++ b/examples/declarative/xmldata/daringfireball.qml
@@ -33,7 +33,7 @@ Rectangle {
text: content
anchors.top: titleText.bottom
width: 580; wrap: true
- onLinkActivated: { print('link clicked: ' + link) }
+ onLinkActivated: { console.log('link clicked: ' + link) }
}
}
}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
index 4add361..bd14516 100644
--- a/examples/declarative/xmldata/yahoonews.qml
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -37,7 +37,7 @@ Rectangle {
x: 10; y: 5
text: '<a href=\'' + link + '\'>' + title + '</a>'
font.bold: true; font.family: "Helvetica"; font.pointSize: 14
- onLinkActivated: { print('link clicked: ' + link) }
+ onLinkActivated: { console.log('link clicked: ' + link) }
}
Text {
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xmlhttprequest/test.qml
index 18447e5..18e328b 100644
--- a/examples/declarative/xmlhttprequest/test.qml
+++ b/examples/declarative/xmlhttprequest/test.qml
@@ -10,21 +10,21 @@ Rectangle {
var doc = new XMLHttpRequest();
doc.onreadystatechange = function() {
if (doc.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
- print ("Headers -->");
- print (doc.getAllResponseHeaders ());
- print ("Last modified -->");
- print (doc.getResponseHeader ("Last-Modified"));
+ console.log("Headers -->");
+ console.log(doc.getAllResponseHeaders ());
+ console.log("Last modified -->");
+ console.log(doc.getResponseHeader ("Last-Modified"));
}
else if (doc.readyState == XMLHttpRequest.DONE) {
var a = doc.responseXML.documentElement;
for (var ii = 0; ii < a.childNodes.length; ++ii) {
- print (a.childNodes[ii].nodeName);
+ console.log(a.childNodes[ii].nodeName);
}
- print ("Headers -->");
- print (doc.getAllResponseHeaders ());
- print ("Last modified -->");
- print (doc.getResponseHeader ("Last-Modified"));
+ console.log("Headers -->");
+ console.log(doc.getAllResponseHeaders ());
+ console.log("Last modified -->");
+ console.log(doc.getResponseHeader ("Last-Modified"));
}
}