Commit 5abed2dd 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 1cda2516
......@@ -78,7 +78,9 @@ PlasmaComponents3.Page {
// Manually dragging the slider around breaks the binding
Connections {
target: batterymonitor
onScreenBrightnessChanged: brightnessSlider.value = batterymonitor.screenBrightness
function onScreenBrightnessChanged() {
brightnessSlider.value = batterymonitor.screenBrightness
}
}
}
......@@ -100,7 +102,9 @@ PlasmaComponents3.Page {
// Manually dragging the slider around breaks the binding
Connections {
target: batterymonitor
onKeyboardBrightnessChanged: keyboardBrightnessSlider.value = batterymonitor.keyboardBrightness
function onKeyboardBrightnessChanged() {
keyboardBrightnessSlider.value = batterymonitor.keyboardBrightness
}
}
}
}
......
......@@ -64,7 +64,7 @@ PlasmaExtras.ExpandableListItem {
Connections {
target: unmountAll
onClicked: {
function onClicked() {
if (model["Removable"] && isMounted) {
actionTriggered();
}
......
......@@ -96,7 +96,7 @@ PlasmaComponents3.Page {
Connections {
target: statusSource
onLastChanged: {
function onLastChanged() {
if (!statusSource.last) {
messageHighlightAnimator.stop()
messageHighlight.visible = false
......@@ -116,7 +116,7 @@ PlasmaComponents3.Page {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
if (!plasmoid.expanded) {
statusSource.clearMessage();
}
......
......@@ -209,7 +209,7 @@ PlasmaComponents3.Page {
Connections {
target: monthView
onCurrentDateChanged: {
function onCurrentDateChanged() {
// Apparently this is needed because this is a simple QList being
// returned and if the list for the current day has 1 event and the
// user clicks some other date which also has 1 event, QML sees the
......@@ -224,7 +224,7 @@ PlasmaComponents3.Page {
Connections {
target: monthView.daysModel
onAgendaUpdated: {
function onAgendaUpdated(updatedDate) {
if (agenda.dateEquals(updatedDate, monthView.currentDate)) {
holidaysList.model = null;
holidaysList.model = monthView.daysModel.eventsForDate(monthView.currentDate);
......
......@@ -79,7 +79,9 @@ MouseArea {
Connections {
target: plasmoid
onExternalData: plasmoid.nativeInterface.url = data
function onExternalData(mimetype, data) {
plasmoid.nativeInterface.url = data
}
}
DragDrop.DropArea {
......
......@@ -59,7 +59,7 @@ PlasmaComponents3.Page {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
if (plasmoid.expanded) {
retrievePosition();
}
......
......@@ -49,7 +49,7 @@ PlasmaComponents3.Page {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
if (plasmoid.expanded) {
list.positionViewAtBeginning();
list.currentIndex = -1;
......
......@@ -78,7 +78,9 @@ RowLayout {
Connections {
target: Globals
// clock time changed
onTimeChanged: notificationHeading.updateAgoText()
function onTimeChanged() {
notificationHeading.updateAgoText()
}
}
PlasmaCore.IconItem {
......
......@@ -45,6 +45,8 @@ QQC2.Control {
Connections {
target: contentItem
onConfigurationChanged: root.configurationChanged()
function onConfigurationChanged() {
root.configurationChanged()
}
}
}
......@@ -47,6 +47,8 @@ QQC2.Control {
Connections {
target: contentItem
onConfigurationChanged: root.configurationChanged()
function onConfigurationChanged() {
root.configurationChanged()
}
}
}
......@@ -40,6 +40,8 @@ QQC2.Control {
Connections {
target: contentItem
onConfigurationChanged: root.configurationChanged()
function onConfigurationChanged() {
root.configurationChanged()
}
}
}
......@@ -84,7 +84,7 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowSchemeNotInstalledWarning: {
function onShowSchemeNotInstalledWarning(schemeName) {
notInstalledWarning.text = i18n("The color scheme '%1' is not installed. Selecting the default theme instead.", schemeName)
notInstalledWarning.visible = true;
}
......@@ -295,14 +295,14 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowSuccessMessage: {
function onShowSuccessMessage(message) {
infoLabel.type = Kirigami.MessageType.Positive;
infoLabel.text = message;
infoLabel.visible = true;
// Avoid dual message widgets
notInstalledWarning.visible = false;
}
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......
......@@ -55,7 +55,7 @@ KCM.GridDelegate {
Connections {
target: kcm
onThemeApplied: {
function onThemeApplied() {
previewWidget.refresh();
}
}
......
......@@ -71,17 +71,17 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowSuccessMessage: {
function onShowSuccessMessage(message) {
infoLabel.type = Kirigami.MessageType.Positive;
infoLabel.text = message;
infoLabel.visible = true;
}
onShowInfoMessage: {
function onShowInfoMessage(message) {
infoLabel.type = Kirigami.MessageType.Information;
infoLabel.text = message;
infoLabel.visible = true;
}
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......
......@@ -158,12 +158,12 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowSuccessMessage: {
function onShowSuccessMessage(message) {
infoLabel.type = Kirigami.MessageType.Positive;
infoLabel.text = message;
infoLabel.visible = true;
}
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......
......@@ -50,7 +50,9 @@ KCM.SimpleKCM {
Connections {
target: kcm
onAliasingChangeApplied: antiAliasingMessage.visible = true
function onAliasingChangeApplied() {
antiAliasingMessage.visible = true
}
}
}
......@@ -62,7 +64,7 @@ KCM.SimpleKCM {
Connections {
target: kcm
onFontsHaveChanged: {
function onFontsHaveChanged() {
hugeFontsMessage.visible = generalFontWidget.font.pointSize > 14
|| fixedWidthFontWidget.font.pointSize > 14
|| smallFontWidget.font.pointSize > 14
......@@ -256,8 +258,12 @@ KCM.SimpleKCM {
}
Connections {
target: kcm.fontsAASettings
onExcludeFromChanged: excludeFromSpinBox.value = kcm.fontsAASettings.excludeFrom;
onExcludeToChanged: excludeToSpinBox.value = kcm.fontsAASettings.excludeTo;
function onExcludeFromChanged() {
excludeFromSpinBox.value = kcm.fontsAASettings.excludeFrom;
}
function onExcludeToChanged() {
excludeToSpinBox.value = kcm.fontsAASettings.excludeTo;
}
}
}
......
......@@ -44,7 +44,7 @@ QtControls.Popup {
Connections {
target: iconTypeList
onCurrentIndexChanged: {
function onCurrentIndexChanged() {
iconSizeSlider.sizes = kcm.availableIconSizes(iconTypeList.currentIndex);
}
}
......
......@@ -187,12 +187,12 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowSuccessMessage: {
function onShowSuccessMessage(message) {
infoLabel.type = Kirigami.MessageType.Positive;
infoLabel.text = message;
infoLabel.visible = true;
}
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......
......@@ -43,7 +43,7 @@ Kirigami.Page {
Connections {
target: kcm.gtkPage
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......@@ -73,7 +73,7 @@ Kirigami.Page {
Connections {
target: kcm.gtkPage
onSelectGtkThemeInCombobox: function(themeName) {
function onSelectGtkThemeInCombobox(themeName) {
gtkThemeCombo.currentIndex = gtkThemeCombo.model.findThemeIndex(themeName)
}
}
......
......@@ -59,7 +59,7 @@ KCM.GridViewKCM {
Connections {
target: kcm
onShowErrorMessage: {
function onShowErrorMessage(message) {
infoLabel.type = Kirigami.MessageType.Error;
infoLabel.text = message;
infoLabel.visible = true;
......@@ -96,7 +96,7 @@ KCM.GridViewKCM {
Connections {
target: kcm
onStyleReconfigured: {
function onStyleReconfigured(message) {
if (styleName === model.styleName) {
thumbnailItem.reload();
}
......
......@@ -66,7 +66,9 @@ ScrollViewKCM {
data: [Connections {
target: addLanguagesSheet
onSheetOpenChanged: languageItem.checked = false
function onSheetOpenChanged() {
languageItem.checked = false
}
}]
}
}
......
......@@ -153,7 +153,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {listView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {listView.currentIndex = tabBox.currentIndex;}
}
}
Component {
......
......@@ -40,7 +40,7 @@ ColumnLayout {
Connections {
target: runnerWindow
onVisibleChanged: {
function onVisibleChanged() {
if (runnerWindow.visible) {
queryField.forceActiveFocus();
listView.currentIndex = -1
......
......@@ -61,7 +61,7 @@ KWin.Switcher {
Connections {
target: tabBox
onCurrentIndexChanged: {
function onCurrentIndexChanged() {
thumbnailListView.currentIndex = tabBox.currentIndex;
thumbnailListView.positionViewAtIndex(thumbnailListView.currentIndex, ListView.Contain)
}
......
......@@ -198,9 +198,9 @@ ColumnLayout {
ColumnLayout {
Connections {
target: root
onHoursIntervalValueChanged: hoursInterval.value = root.hoursIntervalValue
onMinutesIntervalValueChanged: minutesInterval.value = root.minutesIntervalValue
onSecondsIntervalValueChanged: secondsInterval.value = root.secondsIntervalValue
function onHoursIntervalValueChanged() {hoursInterval.value = root.hoursIntervalValue}
function onMinutesIntervalValueChanged() {minutesInterval.value = root.minutesIntervalValue}
function onSecondsIntervalValueChanged() {secondsInterval.value = root.secondsIntervalValue}
}
//FIXME: there should be only one spinbox: QtControls spinboxes are still too limited for it tough
Kirigami.FormLayout {
......
......@@ -66,7 +66,9 @@ Item {
Connections {
target: imageWallpaper
onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0
function onCustomWallpaperPicked() {
wallpapersGrid.currentIndex = 0
}
}
}
}
......
......@@ -71,7 +71,9 @@ Item {
Connections {
target: imageWallpaper
onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0
function onCustomWallpaperPicked() {
wallpapersGrid.currentIndex = 0
}
}
}
}
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