diff -r 5dc02b23752f -r 3e2da88830cd examples/declarative/ui-components/slideswitch/content/Switch.qml --- a/examples/declarative/ui-components/slideswitch/content/Switch.qml Tue Jul 06 15:10:48 2010 +0300 +++ b/examples/declarative/ui-components/slideswitch/content/Switch.qml Wed Aug 18 10:37:55 2010 +0300 @@ -53,12 +53,13 @@ function toggle() { if (toggleswitch.state == "on") toggleswitch.state = "off"; - else toggleswitch.state = "on"; + else + toggleswitch.state = "on"; } //![2] //![3] - function dorelease() { + function releaseSwitch() { if (knob.x == 1) { if (toggleswitch.state == "off") return; } @@ -87,7 +88,7 @@ anchors.fill: parent drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: 1; drag.maximumX: 78 onClicked: toggle() - onReleased: dorelease() + onReleased: releaseSwitch() } } //![5]