summaryrefslogtreecommitdiffstats
path: root/demos/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-08 10:05:18 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-08 10:05:18 (GMT)
commit7a5659038c6b558f4edc49150126787a3930102b (patch)
treec97b5554fc73b7fd87019ed8b4515e27bd28fe5a /demos/declarative
parent136daef2ff117698c6788655bcd75e046ec84753 (diff)
downloadQt-7a5659038c6b558f4edc49150126787a3930102b.zip
Qt-7a5659038c6b558f4edc49150126787a3930102b.tar.gz
Qt-7a5659038c6b558f4edc49150126787a3930102b.tar.bz2
Incorrect use of Script {}
Diffstat (limited to 'demos/declarative')
-rw-r--r--demos/declarative/contacts/FieldText.qml40
-rw-r--r--demos/declarative/contacts/RemoveButton.qml23
-rw-r--r--demos/declarative/webbrowser/fieldtext/FieldText.qml2
3 files changed, 31 insertions, 34 deletions
diff --git a/demos/declarative/contacts/FieldText.qml b/demos/declarative/contacts/FieldText.qml
index d30d4d8..2e8b60d 100644
--- a/demos/declarative/contacts/FieldText.qml
+++ b/demos/declarative/contacts/FieldText.qml
@@ -9,29 +9,29 @@ Rectangle {
property var label: ""
onTextChanged: { reset() }
signal confirmed
- resources: [
- Script {
- function edit() {
- if (!contacts.mouseGrabbed) {
- fieldText.state='editing';
- contacts.mouseGrabbed=true;
- }
- }
- function confirm() {
- fieldText.text = textEdit.text;
- fieldText.state='';
- contacts.mouseGrabbed=false;
- fieldText.confirmed();
- }
- function reset() {
- textEdit.text = fieldText.text;
- fieldText.state='';
- contacts.mouseGrabbed=false;
+ Script {
+
+ function edit() {
+ if (!contacts.mouseGrabbed) {
+ fieldText.state='editing';
+ contacts.mouseGrabbed=true;
}
-
}
- ]
+ function confirm() {
+ fieldText.text = textEdit.text;
+ fieldText.state='';
+ contacts.mouseGrabbed=false;
+ fieldText.confirmed();
+ }
+ function reset() {
+ textEdit.text = fieldText.text;
+ fieldText.state='';
+ contacts.mouseGrabbed=false;
+ }
+
+ }
+
Image {
id: cancelIcon
width: 22
diff --git a/demos/declarative/contacts/RemoveButton.qml b/demos/declarative/contacts/RemoveButton.qml
index cc858c3..2c3cc9e 100644
--- a/demos/declarative/contacts/RemoveButton.qml
+++ b/demos/declarative/contacts/RemoveButton.qml
@@ -8,21 +8,20 @@ Rectangle {
radius: 5
property var expandedWidth: 230
signal confirmed
- resources: [
- Script {
- function toggle() {
- if (removeButton.state == 'opened') {
- removeButton.state = '';
- contacts.mouseGrabbed=false;
- } else {
- if (!contacts.mouseGrabbed) {
- removeButton.state = 'opened';
- contacts.mouseGrabbed=true;
- }
+ Script {
+ function toggle() {
+ if (removeButton.state == 'opened') {
+ removeButton.state = '';
+ contacts.mouseGrabbed=false;
+ } else {
+ if (!contacts.mouseGrabbed) {
+ removeButton.state = 'opened';
+ contacts.mouseGrabbed=true;
}
}
}
- ]
+ }
+
Image {
id: trashIcon
width: 22
diff --git a/demos/declarative/webbrowser/fieldtext/FieldText.qml b/demos/declarative/webbrowser/fieldtext/FieldText.qml
index fe55185..2adfbbf 100644
--- a/demos/declarative/webbrowser/fieldtext/FieldText.qml
+++ b/demos/declarative/webbrowser/fieldtext/FieldText.qml
@@ -10,7 +10,6 @@ Item {
signal cancelled
signal startEdit
- resources: [
Script {
function edit() {
@@ -36,7 +35,6 @@ Item {
}
}
- ]
Image {
id: cancelIcon