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>) { ... }
master
Konrad Materka 4 years ago
parent 7cab8cf8bb
commit d2f3372749

@ -77,7 +77,9 @@ KCM.GridView {
} }
Connections { Connections {
target: kcm target: kcm
onBorderSizeChanged: settingsItem.borderSizesIndex = kcm.borderSize function onBorderSizeChanged() {
settingsItem.borderSizesIndex = kcm.borderSize
}
} }
} }
actions: [ actions: [
@ -100,7 +102,9 @@ KCM.GridView {
} }
Connections { Connections {
target: kcm target: kcm
onThemeChanged: view.currentIndex = kcm.theme function onThemeChanged() {
view.currentIndex = kcm.theme
}
} }
} }

@ -121,7 +121,9 @@ Kirigami.Page {
Connections { Connections {
target: kcm target: kcm
onThemeChanged: borderSizeComboBox.autoBorderUpdate() function onThemeChanged() {
borderSizeComboBox.autoBorderUpdate()
}
} }
} }
Item { Item {

@ -20,11 +20,11 @@ ScrollViewKCM {
Connections { Connections {
target: kcm.desktopsModel target: kcm.desktopsModel
onReadyChanged: { function onReadyChanged() {
rowsSpinBox.value = kcm.desktopsModel.rows; rowsSpinBox.value = kcm.desktopsModel.rows;
} }
onRowsChanged: { function onRowsChanged() {
rowsSpinBox.value = kcm.desktopsModel.rows; rowsSpinBox.value = kcm.desktopsModel.rows;
} }
} }

@ -35,7 +35,7 @@ Multimedia.Video {
} }
Connections { Connections {
target: videoItem target: videoItem
onStopped: { function onStopped() {
replayButton.visible = true replayButton.visible = true
} }
} }

@ -140,10 +140,14 @@ DecorationButton {
onPressedChanged: colorize() onPressedChanged: colorize()
Connections { Connections {
target: decoration.client target: decoration.client
onActiveChanged: button.colorize() function onActiveChanged() {
button.colorize()
}
} }
Connections { Connections {
target: options target: options
onColorsChanged: button.colorize(); function onColorsChanged() {
button.colorize();
}
} }
} }

@ -405,10 +405,14 @@ Decoration {
} }
Connections { Connections {
target: decoration target: decoration
onConfigChanged: root.readConfig() function onConfigChanged() {
root.readConfig()
}
} }
Connections { Connections {
target: decorationSettings target: decorationSettings
onBorderSizeChanged: root.readBorderSize(); function onBorderSizeChanged() {
root.readBorderSize();
}
} }
} }

@ -47,7 +47,7 @@ Window {
target: outline target: outline
// when unified geometry changes, this means our window position changed and any // 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 // animation will potentially be offset and/or cut off, skip the animation in this case
onUnifiedGeometryChanged: { function onUnifiedGeometryChanged() {
if (window.visible) { if (window.visible) {
window.animationEnabled = false window.animationEnabled = false
svg.setGeometry(outline.geometry) svg.setGeometry(outline.geometry)

@ -17,7 +17,7 @@ Item {
Connections { Connections {
target: workspace target: workspace
onCurrentDesktopChanged: { function onCurrentDesktopChanged() {
if (!mainItemLoader.item) { if (!mainItemLoader.item) {
mainItemLoader.source = "osd.qml"; mainItemLoader.source = "osd.qml";
} }

@ -277,13 +277,15 @@ PlasmaCore.Dialog {
Connections { Connections {
target: workspace target: workspace
onCurrentDesktopChanged: dialogItem.show() onCurrentDesktopChanged: dialogItem.show()
onNumberDesktopsChanged: { function onNumberDesktopsChanged() {
repeater.model = workspace.desktops; repeater.model = workspace.desktops;
} }
} }
Connections { Connections {
target: options target: options
onConfigChanged: dialogItem.loadConfig() function onConfigChanged() {
dialogItem.loadConfig()
}
} }
Component.onCompleted: { Component.onCompleted: {
view.columns = workspace.desktopGridWidth; view.columns = workspace.desktopGridWidth;

@ -67,7 +67,7 @@ ColumnLayout {
Connections { Connections {
target: org_kde_kwin_tests_pointerconstraints_backend target: org_kde_kwin_tests_pointerconstraints_backend
onForceSurfaceCommit: { function onForceSurfaceCommit() {
forceCommitRect.visible = true forceCommitRect.visible = true
} }
} }

Loading…
Cancel
Save