Commit d2f33727 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 7cab8cf8
......@@ -77,7 +77,9 @@ KCM.GridView {
}
Connections {
target: kcm
onBorderSizeChanged: settingsItem.borderSizesIndex = kcm.borderSize
function onBorderSizeChanged() {
settingsItem.borderSizesIndex = kcm.borderSize
}
}
}
actions: [
......@@ -100,7 +102,9 @@ KCM.GridView {
}
Connections {
target: kcm
onThemeChanged: view.currentIndex = kcm.theme
function onThemeChanged() {
view.currentIndex = kcm.theme
}
}
}
......@@ -121,7 +121,9 @@ Kirigami.Page {
Connections {
target: kcm
onThemeChanged: borderSizeComboBox.autoBorderUpdate()
function onThemeChanged() {
borderSizeComboBox.autoBorderUpdate()
}
}
}
Item {
......
......@@ -20,11 +20,11 @@ ScrollViewKCM {
Connections {
target: kcm.desktopsModel
onReadyChanged: {
function onReadyChanged() {
rowsSpinBox.value = kcm.desktopsModel.rows;
}
onRowsChanged: {
function onRowsChanged() {
rowsSpinBox.value = kcm.desktopsModel.rows;
}
}
......
......@@ -35,7 +35,7 @@ Multimedia.Video {
}
Connections {
target: videoItem
onStopped: {
function onStopped() {
replayButton.visible = true
}
}
......
......@@ -140,10 +140,14 @@ DecorationButton {
onPressedChanged: colorize()
Connections {
target: decoration.client
onActiveChanged: button.colorize()
function onActiveChanged() {
button.colorize()
}
}
Connections {
target: options
onColorsChanged: button.colorize();
function onColorsChanged() {
button.colorize();
}
}
}
......@@ -405,10 +405,14 @@ Decoration {
}
Connections {
target: decoration
onConfigChanged: root.readConfig()
function onConfigChanged() {
root.readConfig()
}
}
Connections {
target: decorationSettings
onBorderSizeChanged: root.readBorderSize();
function onBorderSizeChanged() {
root.readBorderSize();
}
}
}
......@@ -47,7 +47,7 @@ Window {
target: outline
// when unified geometry changes, this means our window position changed and any
// animation will potentially be offset and/or cut off, skip the animation in this case
onUnifiedGeometryChanged: {
function onUnifiedGeometryChanged() {
if (window.visible) {
window.animationEnabled = false
svg.setGeometry(outline.geometry)
......
......@@ -17,7 +17,7 @@ Item {
Connections {
target: workspace
onCurrentDesktopChanged: {
function onCurrentDesktopChanged() {
if (!mainItemLoader.item) {
mainItemLoader.source = "osd.qml";
}
......
......@@ -277,13 +277,15 @@ PlasmaCore.Dialog {
Connections {
target: workspace
onCurrentDesktopChanged: dialogItem.show()
onNumberDesktopsChanged: {
function onNumberDesktopsChanged() {
repeater.model = workspace.desktops;
}
}
Connections {
target: options
onConfigChanged: dialogItem.loadConfig()
function onConfigChanged() {
dialogItem.loadConfig()
}
}
Component.onCompleted: {
view.columns = workspace.desktopGridWidth;
......
......@@ -67,7 +67,7 @@ ColumnLayout {
Connections {
target: org_kde_kwin_tests_pointerconstraints_backend
onForceSurfaceCommit: {
function onForceSurfaceCommit() {
forceCommitRect.visible = true
}
}
......
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