Commit a7d49293 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

userfeedback kcm: fix qml type error

parent 42511d6f
......@@ -75,9 +75,17 @@ SimpleKCM {
stepSize: 1
snapMode: QQC2.Slider.SnapAlways
function findIndex(array, what) {
for (var v in array) {
if (array[v] == what)
return v;
}
return null;
}
Component.onCompleted: {
var idx = modeOptions.findIndex(kcm.plasmaFeedbackLevel)
value = idx < 0 ? 2 : modeOptions[idx]
var idx = findIndex(modeOptions, kcm.plasmaFeedbackLevel)
value = idx===null ? 2 : modeOptions[idx]
}
onMoved: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment