[kwineffects] Fix wrong object being passed as a QQuickItem* context

Without this patch the following warning is issued:

    Could not convert argument 1 at
        onTriggered@file:///usr/share/kpackage/kcms/kcm_kwin_effects/contents/ui/Effect.qml:129
        onClicked@file:///usr/lib/qml/org/kde/kirigami.2/templates/SwipeListItem.qml:485
    Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated.
    This will throw a JavaScript TypeError in future releases of Qt!
This commit is contained in:
ivan tkachenko 2022-07-13 00:07:59 +03:00
parent d7fd53e9b0
commit 0c8d87f9d4
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -126,7 +126,7 @@ Kirigami.SwipeListItem {
enabled: model.StatusRole != Qt.Unchecked
icon.name: "configure"
tooltip: i18nc("@info:tooltip", "Configure...")
onTriggered: kcm.configure(model.ServiceNameRole, this)
onTriggered: kcm.configure(model.ServiceNameRole, listItem)
}
]
}