Bind checked property to the corresponding setting value for CameraTextSwitch
[harmattan/cameraplus] / qml / ImageModeSettings.qml
index 0cc8ff2..0267659 100644 (file)
@@ -47,12 +47,11 @@ Flickable {
             width: parent.width
         }
 
-        TextSwitch {
+        CameraTextSwitch {
             text: qsTr("Enable face detection")
-            // We have to do it that way because QML complains about a binding
-            // loop for checked if we bind the checked property to the settings value.
-            Component.onCompleted: checked = settings.faceDetectionEnabled
+            checked: settings.faceDetectionEnabled
             onCheckedChanged: settings.faceDetectionEnabled = checked
+            visible: camera ? !camera.quirks.hasQuirk(Quirks.NoFaceDetection) : false
         }
 
         CameraSettings {