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>) { ... }
wilder-5.22
Konrad Materka 5 years ago
parent 1cda2516f8
commit 5abed2ddbf
  1. 8
      applets/batterymonitor/package/contents/ui/PopupDialog.qml
  2. 2
      applets/devicenotifier/package/contents/ui/DeviceItem.qml
  3. 4
      applets/devicenotifier/package/contents/ui/FullRepresentation.qml
  4. 4
      applets/digital-clock/package/contents/ui/CalendarView.qml
  5. 4
      applets/icon/package/contents/ui/main.qml
  6. 2
      applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
  7. 2
      applets/notifications/package/contents/ui/FullRepresentation.qml
  8. 4
      applets/notifications/package/contents/ui/NotificationHeader.qml
  9. 4
      applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigAppearance.qml
  10. 4
      applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigSensors.qml
  11. 4
      applets/systemmonitor/systemmonitor/package/contents/ui/config/FaceDetails.qml
  12. 6
      kcms/colors/package/contents/ui/main.qml
  13. 2
      kcms/cursortheme/package/contents/ui/Delegate.qml
  14. 6
      kcms/cursortheme/package/contents/ui/main.qml
  15. 4
      kcms/desktoptheme/package/contents/ui/main.qml
  16. 14
      kcms/fonts/package/contents/ui/main.qml
  17. 2
      kcms/icons/package/contents/ui/IconSizePopup.qml
  18. 4
      kcms/icons/package/contents/ui/main.qml
  19. 4
      kcms/style/package/contents/ui/GtkStylePage.qml
  20. 4
      kcms/style/package/contents/ui/main.qml
  21. 4
      kcms/translations/package/contents/ui/main.qml
  22. 2
      lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml
  23. 2
      lookandfeel/contents/runcommand/RunCommand.qml
  24. 2
      lookandfeel/contents/windowswitcher/WindowSwitcher.qml
  25. 6
      wallpapers/image/imagepackage/contents/ui/config.qml
  26. 4
      wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml
  27. 4
      wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml

@ -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
}
}
}
}

Loading…
Cancel
Save