Commit 29e45a56 authored by Konrad Materka's avatar Konrad Materka

Fix Connections warnings

Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
parent 99291630
......@@ -89,10 +89,16 @@ KCM.SimpleKCM {
Connections {
target: kcm
onDangerousSave: dangerousSaveMsg.visible = true;
onErrorOnSave: errSaveMsg.visible = true;
onGlobalScaleWritten: scaleMsg.visible = true;
onOutputConnect: {
function onDangerousSave() {
dangerousSaveMsg.visible = true;
}
function onErrorOnSave() {
errSaveMsg.visible = true;
}
function onGlobalScaleWritten() {
scaleMsg.visible = true;
}
function onOutputConnect(connected) {
if (connected) {
connectMsg.text = i18n("A new output has been added. Settings have been reloaded.");
} else {
......@@ -100,9 +106,11 @@ KCM.SimpleKCM {
}
connectMsg.visible = true;
}
onBackendError: errBackendMsg.visible = true;
function onBackendError() {
errBackendMsg.visible = true;
}
onChanged: {
function onChanged() {
dangerousSaveMsg.visible = false;
errSaveMsg.visible = false;
scaleMsg.visible = false;
......
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