diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-04-08 07:34:37 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-04-08 07:34:37 (GMT) |
commit | 3ceffd7287a269ec5ea9dab712ee9120a539e0e1 (patch) | |
tree | 37cc20a4f27584d5871e7a9e77de4f8e48c8764c /examples/declarative/tutorials/samegame/samegame4/samegame.qml | |
parent | dcce90c4d9c8d010d7fc45c33048ff00e468b89c (diff) | |
download | Qt-3ceffd7287a269ec5ea9dab712ee9120a539e0e1.zip Qt-3ceffd7287a269ec5ea9dab712ee9120a539e0e1.tar.gz Qt-3ceffd7287a269ec5ea9dab712ee9120a539e0e1.tar.bz2 |
Improve example code - rename variables, remove redundant ids.
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame4/samegame.qml')
-rw-r--r-- | examples/declarative/tutorials/samegame/samegame4/samegame.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index 090496d..8cc2137 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -36,7 +36,7 @@ Rectangle { //![0] Dialog { - id: scoreName; anchors.centerIn: parent; z: 22; + id: nameInputDialog; anchors.centerIn: parent; z: 22; Text { id: spacer opacity: 0 @@ -45,9 +45,9 @@ Rectangle { TextInput { id: editor onAccepted: { - if(scoreName.opacity==1&&editor.text!="") + if(nameInputDialog.opacity==1&&editor.text!="") saveHighScore(editor.text); - scoreName.forceClose(); + nameInputDialog.forceClose(); } anchors.verticalCenter: parent.verticalCenter width: 72; focus: true @@ -63,7 +63,7 @@ Rectangle { anchors.bottom: screen.bottom Button { - id: btnA; text: "New Game"; onClicked: {SameGame.initBoard();} + text: "New Game"; onClicked: SameGame.initBoard(); anchors.left: parent.left; anchors.leftMargin: 3 anchors.verticalCenter: parent.verticalCenter } |