diff --git a/applets/activitybar/contents/ui/main.qml b/applets/activitybar/contents/ui/main.qml --- a/applets/activitybar/contents/ui/main.qml +++ b/applets/activitybar/contents/ui/main.qml @@ -62,7 +62,7 @@ tabBar.currentTab = tab; } } - onCheckedChanged: { + function onCheckedChanged() { if(model.current) { tabBar.currentTab = tab; } diff --git a/applets/analog-clock/contents/ui/analogclock.qml b/applets/analog-clock/contents/ui/analogclock.qml --- a/applets/analog-clock/contents/ui/analogclock.qml +++ b/applets/analog-clock/contents/ui/analogclock.qml @@ -50,7 +50,7 @@ engine: "time" connectedSources: "Local" interval: showSecondsHand ? 1000 : 30000 - onDataChanged: { + function onDataChanged() { var date = new Date(data["Local"]["DateTime"]); hours = date.getHours(); minutes = date.getMinutes(); diff --git a/applets/appmenu/package/contents/ui/main.qml b/applets/appmenu/package/contents/ui/main.qml --- a/applets/appmenu/package/contents/ui/main.qml +++ b/applets/appmenu/package/contents/ui/main.qml @@ -35,7 +35,7 @@ readonly property bool kcmAuthorized: KCMShell.authorize(["style.desktop"]).length > 0 - onViewChanged: { + function onViewChanged() { plasmoid.nativeInterface.view = view } diff --git a/applets/batterymonitor/package/contents/ui/BatteryItem.qml b/applets/batterymonitor/package/contents/ui/BatteryItem.qml --- a/applets/batterymonitor/package/contents/ui/BatteryItem.qml +++ b/applets/batterymonitor/package/contents/ui/BatteryItem.qml @@ -63,7 +63,7 @@ id: detailsLabel width: modelData.value && parent ? parent.width - detailsLayout.leftColumnWidth - units.smallSpacing : detailsLayout.leftColumnWidth + units.smallSpacing wrapMode: Text.NoWrap - onPaintedWidthChanged: { // horrible HACK to get a column layout + function onPaintedWidthChanged() { // horrible HACK to get a column layout if (paintedWidth > detailsLayout.leftColumnWidth) { detailsLayout.leftColumnWidth = paintedWidth } diff --git a/applets/batterymonitor/package/contents/ui/PopupDialog.qml b/applets/batterymonitor/package/contents/ui/PopupDialog.qml --- a/applets/batterymonitor/package/contents/ui/PopupDialog.qml +++ b/applets/batterymonitor/package/contents/ui/PopupDialog.qml @@ -42,7 +42,7 @@ PowerManagementItem { id: pmSwitch width: parent.width - onEnabledChanged: powermanagementChanged(enabled) + function onEnabledChanged() { powermanagementChanged(enabled) } KeyNavigation.tab: batteryList KeyNavigation.backtab: keyboardBrightnessSlider } @@ -78,7 +78,7 @@ // Manually dragging the slider around breaks the binding Connections { target: batterymonitor - onScreenBrightnessChanged: brightnessSlider.value = batterymonitor.screenBrightness + function onScreenBrightnessChanged() { brightnessSlider.value = batterymonitor.screenBrightness } } } @@ -99,7 +99,7 @@ // Manually dragging the slider around breaks the binding Connections { target: batterymonitor - onKeyboardBrightnessChanged: keyboardBrightnessSlider.value = batterymonitor.keyboardBrightness + function onKeyboardBrightnessChanged() { keyboardBrightnessSlider.value = batterymonitor.keyboardBrightness } } } } diff --git a/applets/batterymonitor/package/contents/ui/batterymonitor.qml b/applets/batterymonitor/package/contents/ui/batterymonitor.qml --- a/applets/batterymonitor/package/contents/ui/batterymonitor.qml +++ b/applets/batterymonitor/package/contents/ui/batterymonitor.qml @@ -115,7 +115,7 @@ readonly property bool kcmEnergyInformationAuthorized: KCMShell.authorize(kcm_energyinfo).length > 0 property QtObject updateScreenBrightnessJob - onScreenBrightnessChanged: { + function onScreenBrightnessChanged() { if (disableBrightnessUpdate) { return; } @@ -131,7 +131,7 @@ } property QtObject updateKeyboardBrightnessJob - onKeyboardBrightnessChanged: { + function onKeyboardBrightnessChanged() { if (disableBrightnessUpdate) { return; } @@ -194,7 +194,7 @@ onSourceRemoved: { disconnectSource(source); } - onDataChanged: { + function onDataChanged() { Logic.updateBrightness(batterymonitor, pmSource) Logic.updateInhibitions(batterymonitor, pmSource) } @@ -232,7 +232,7 @@ property int cookie1: -1 property int cookie2: -1 - onPowermanagementChanged: { + function onPowermanagementChanged() { var service = pmSource.serviceForSource("PowerDevil"); if (checked) { var op1 = service.operationDescription("stopSuppressingSleep"); diff --git a/applets/calendar/package/contents/ui/configGeneral.qml b/applets/calendar/package/contents/ui/configGeneral.qml --- a/applets/calendar/package/contents/ui/configGeneral.qml +++ b/applets/calendar/package/contents/ui/configGeneral.qml @@ -52,12 +52,12 @@ text: i18nc("Show the number of the day (eg. 31) in the icon", "Show day of the month") checked: cfg_compactDisplay == "d" - onCheckedChanged: if (checked) cfg_compactDisplay = "d" + function onCheckedChanged() { if (checked) cfg_compactDisplay = "d" } } QtControls.RadioButton { text: i18nc("Show the week number (eg. 50) in the icon", "Show week number") checked: cfg_compactDisplay == "w" - onCheckedChanged: if (checked) cfg_compactDisplay = "w" + function onCheckedChanged() { if (checked) cfg_compactDisplay = "w" } } } diff --git a/applets/clipboard/contents/ui/BarcodePage.qml b/applets/clipboard/contents/ui/BarcodePage.qml --- a/applets/clipboard/contents/ui/BarcodePage.qml +++ b/applets/clipboard/contents/ui/BarcodePage.qml @@ -60,7 +60,7 @@ id: menu visualParent: configureButton placement: PlasmaCore.Types.BottomPosedLeftAlignedPopup - onStatusChanged: { + function onStatusChanged() { if (status == PlasmaComponents.DialogStatus.Closed) { configureButton.checked = false; } @@ -119,8 +119,8 @@ Layout.fillWidth: true Layout.fillHeight: true Layout.topMargin: units.smallSpacing - onWidthChanged: barcodeView.show(barcodeView.uuid) - onHeightChanged: barcodeView.show(barcodeView.uuid) + function onWidthChanged() { barcodeView.show(barcodeView.uuid) } + function onHeightChanged() { barcodeView.show(barcodeView.uuid) } PlasmaComponents.BusyIndicator { id: busyIndicator anchors.centerIn: parent diff --git a/applets/clipboard/contents/ui/ClipboardItemDelegate.qml b/applets/clipboard/contents/ui/ClipboardItemDelegate.qml --- a/applets/clipboard/contents/ui/ClipboardItemDelegate.qml +++ b/applets/clipboard/contents/ui/ClipboardItemDelegate.qml @@ -47,7 +47,7 @@ if (plasmoid.hideOnWindowDeactivate) plasmoid.expanded = false; } - onContainsMouseChanged: { + function onContainsMouseChanged() { if (containsMouse) { menuListView.currentIndex = index } else { @@ -115,7 +115,7 @@ } source: "DelegateToolButtons.qml" active: menuItem.ListView.isCurrentItem - onActiveChanged: { + function onActiveChanged() { if (active) { // break binding, once it was loaded, never unload active = true; diff --git a/applets/clipboard/contents/ui/clipboard.qml b/applets/clipboard/contents/ui/clipboard.qml --- a/applets/clipboard/contents/ui/clipboard.qml +++ b/applets/clipboard/contents/ui/clipboard.qml @@ -42,7 +42,7 @@ clipboardSource.service("", "configureKlipper"); } - onIsClipboardEmptyChanged: { + function onIsClipboardEmptyChanged() { if (isClipboardEmpty) { // We need to hide the applet before changing its status to passive // because only the active applet can hide itself diff --git a/applets/devicenotifier/package/contents/ui/ActionItem.qml b/applets/devicenotifier/package/contents/ui/ActionItem.qml --- a/applets/devicenotifier/package/contents/ui/ActionItem.qml +++ b/applets/devicenotifier/package/contents/ui/ActionItem.qml @@ -34,7 +34,7 @@ height: row.height + 2 * row.y hoverEnabled: true - onContainsMouseChanged: { + function onContainsMouseChanged() { area.ListView.view.currentIndex = (containsMouse ? index : -1) } diff --git a/applets/devicenotifier/package/contents/ui/DeviceItem.qml b/applets/devicenotifier/package/contents/ui/DeviceItem.qml --- a/applets/devicenotifier/package/contents/ui/DeviceItem.qml +++ b/applets/devicenotifier/package/contents/ui/DeviceItem.qml @@ -53,13 +53,13 @@ height: row.childrenRect.height + 2 * row.y hoverEnabled: true - onHasMessageChanged: { + function onHasMessageChanged() { if (hasMessage) { messageHighlight.highlight(this) } } - onContainsMouseChanged: { + function onContainsMouseChanged() { if (containsMouse) { devicenotifier.currentIndex = index } diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml --- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml +++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml @@ -55,8 +55,8 @@ property int polls: 0 //poll only on plasmoid expanded interval: !fullRep.containsMouse && !fullRep.Window.active && spontaneousOpen && plasmoid.expanded ? 3000 : 0 - onIntervalChanged: polls = 0; - onDataChanged: { + function onIntervalChanged() { polls = 0; } + function onDataChanged() { //only do when polling if (interval == 0 || polls++ < 1) { return; @@ -86,7 +86,7 @@ Connections { target: statusSource - onLastChanged: { + function onLastChanged() { if (!statusSource.last) { messageHighlightAnimator.stop() messageHighlight.visible = false @@ -106,7 +106,7 @@ Connections { target: plasmoid - onExpandedChanged: { + function onExpandedChanged() { if (!plasmoid.expanded) { statusSource.clearMessage() } @@ -216,7 +216,7 @@ } property int operationResult: (model["Operation result"]) - onOperationResultChanged: { + function onOperationResultChanged() { if (operationResult == 1) { devicenotifier.popupIcon = "dialog-ok" popupIconTimer.restart() diff --git a/applets/devicenotifier/package/contents/ui/devicenotifier.qml b/applets/devicenotifier/package/contents/ui/devicenotifier.qml --- a/applets/devicenotifier/package/contents/ui/devicenotifier.qml +++ b/applets/devicenotifier/package/contents/ui/devicenotifier.qml @@ -139,7 +139,7 @@ } } - onDataChanged: { + function onDataChanged() { processLastDevice(true); var counter = 0; for (var i = 0; i < devicenotifier.connectedRemovables.length; i++) { @@ -213,7 +213,7 @@ connectSource(source); } onSourceRemoved: disconnectSource(source) - onDataChanged: { + function onDataChanged() { if (last) { lastUdi = data[last].udi diff --git a/applets/digital-clock/package/contents/ui/CalendarView.qml b/applets/digital-clock/package/contents/ui/CalendarView.qml --- a/applets/digital-clock/package/contents/ui/CalendarView.qml +++ b/applets/digital-clock/package/contents/ui/CalendarView.qml @@ -47,7 +47,7 @@ property bool isExpanded: plasmoid.expanded - onIsExpandedChanged: { + function onIsExpandedChanged() { // clear all the selections when the plasmoid is showing/hiding monthView.resetToToday(); } @@ -172,7 +172,7 @@ 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 @@ -198,7 +198,7 @@ Connections { target: plasmoid.configuration - onEnabledCalendarPluginsChanged: { + function onEnabledCalendarPluginsChanged() { PlasmaCalendar.EventPluginsManager.enabledPlugins = plasmoid.configuration.enabledCalendarPlugins; } } diff --git a/applets/digital-clock/package/contents/ui/DigitalClock.qml b/applets/digital-clock/package/contents/ui/DigitalClock.qml --- a/applets/digital-clock/package/contents/ui/DigitalClock.qml +++ b/applets/digital-clock/package/contents/ui/DigitalClock.qml @@ -60,18 +60,18 @@ main.height <= 2 * theme.smallestFont.pixelSize && (main.showDate || timezoneLabel.visible) - onDateFormatChanged: { + function onDateFormatChanged() { setupLabels(); } - onDisplayTimezoneAsCodeChanged: { setupLabels(); } - onStateChanged: { setupLabels(); } + function onDisplayTimezoneAsCodeChanged() { setupLabels(); } + function onStateChanged() { setupLabels(); } - onLastSelectedTimezoneChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } - onShowSecondsChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } - onShowLocalTimezoneChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } - onShowDateChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } - onUse24hFormatChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } + function onLastSelectedTimezoneChanged() { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } + function onShowSecondsChanged() { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } + function onShowLocalTimezoneChanged() { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } + function onShowDateChanged() { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } + function onUse24hFormatChanged() { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) } Connections { target: plasmoid @@ -83,7 +83,7 @@ Connections { target: plasmoid.configuration - onSelectedTimeZonesChanged: { + function onSelectedTimeZonesChanged() { // If the currently selected timezone was removed, // default to the first one in the list var lastSelectedTimezone = plasmoid.configuration.lastSelectedTimezone; diff --git a/applets/digital-clock/package/contents/ui/configAppearance.qml b/applets/digital-clock/package/contents/ui/configAppearance.qml --- a/applets/digital-clock/package/contents/ui/configAppearance.qml +++ b/applets/digital-clock/package/contents/ui/configAppearance.qml @@ -46,7 +46,7 @@ property alias cfg_customDateFormat: customDateFormat.text property alias cfg_use24hFormat: use24hFormat.currentIndex - onCfg_fontFamilyChanged: { + function onCfg_fontFamilyChanged() { // HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined if (cfg_fontFamily) { for (var i = 0, j = fontsModel.count; i < j; ++i) { @@ -126,7 +126,7 @@ i18n("Use Region Defaults"), i18n("24-Hour") ] - onCurrentIndexChanged: cfg_use24hFormat = currentIndex + function onCurrentIndexChanged() { cfg_use24hFormat = currentIndex } } QtControls.Button { @@ -169,7 +169,7 @@ 'name': "custom" } ] - onCurrentIndexChanged: cfg_dateFormat = model[currentIndex]["name"] + function onCurrentIndexChanged() { cfg_dateFormat = model[currentIndex]["name"] } Component.onCompleted: { for (var i = 0; i < model.length; i++) { @@ -230,7 +230,7 @@ // doesn't autodeduce from model because we manually populate it textRole: "text" - onCurrentIndexChanged: { + function onCurrentIndexChanged() { var current = model.get(currentIndex) if (current) { cfg_fontFamily = current.value diff --git a/applets/digital-clock/package/contents/ui/configTimeZones.qml b/applets/digital-clock/package/contents/ui/configTimeZones.qml --- a/applets/digital-clock/package/contents/ui/configTimeZones.qml +++ b/applets/digital-clock/package/contents/ui/configTimeZones.qml @@ -36,7 +36,7 @@ TimeZoneModel { id: timeZones - onSelectedTimeZonesChanged: { + function onSelectedTimeZonesChanged() { if (selectedTimeZones.length === 0) { messageWidget.visible = true; diff --git a/applets/digital-clock/package/contents/ui/main.qml b/applets/digital-clock/package/contents/ui/main.qml --- a/applets/digital-clock/package/contents/ui/main.qml +++ b/applets/digital-clock/package/contents/ui/main.qml @@ -100,7 +100,7 @@ property var allTimezones Connections { target: plasmoid.configuration - onSelectedTimeZonesChanged: root.initTimezones(); + function onSelectedTimeZonesChanged() { root.initTimezones(); } } PlasmaCore.DataSource { diff --git a/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml b/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml --- a/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml +++ b/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml @@ -59,14 +59,14 @@ Connections { target: plasmoid - onExpandedChanged: { + function onExpandedChanged() { if (plasmoid.expanded) { retrievePosition(); } } } - onPositionChanged: { + function onPositionChanged() { // we don't want to interrupt the user dragging the slider if (!seekSlider.pressed && !keyPressed) { // we also don't want passive position updates @@ -76,7 +76,7 @@ } } - onLengthChanged: { + function onLengthChanged() { disablePositionUpdate = true // When reducing maximumValue, value is clamped to it, however // when increasing it again it gets its old value back. @@ -466,7 +466,7 @@ visible: model.length > 2 // more than one player, @multiplex is always there model: root.mprisSourcesModel - onModelChanged: { + function onModelChanged() { // if model changes, ComboBox resets, so we try to find the current player again... for (var i = 0, length = model.length; i < length; ++i) { if (model[i].source === mpris2Source.current) { diff --git a/applets/mediacontroller/contents/ui/main.qml b/applets/mediacontroller/contents/ui/main.qml --- a/applets/mediacontroller/contents/ui/main.qml +++ b/applets/mediacontroller/contents/ui/main.qml @@ -139,7 +139,7 @@ // HACK Some players like Amarok take quite a while to load the next track // this avoids having the plasmoid jump between popup and panel - onStateChanged: { + function onStateChanged() { if (state != "") { plasmoid.status = PlasmaCore.Types.ActiveStatus } else { diff --git a/applets/notifications/package/contents/ui/DraggableFileArea.qml b/applets/notifications/package/contents/ui/DraggableFileArea.qml --- a/applets/notifications/package/contents/ui/DraggableFileArea.qml +++ b/applets/notifications/package/contents/ui/DraggableFileArea.qml @@ -51,7 +51,7 @@ area.contextMenuRequested(mouse.x, mouse.y); } } - onPositionChanged: { + function onPositionChanged() { if (_pressX !== -1 && _pressY !== -1 && plasmoid.nativeInterface.isDrag(_pressX, _pressY, mouse.x, mouse.y)) { plasmoid.nativeInterface.startDrag(area.dragParent, area.dragUrl, area.dragPixmap); _pressX = -1; @@ -62,7 +62,7 @@ _pressX = -1; _pressY = -1; } - onContainsMouseChanged: { + function onContainsMouseChanged() { if (!containsMouse) { _pressX = -1; _pressY = -1; diff --git a/applets/notifications/package/contents/ui/EditContextMenu.qml b/applets/notifications/package/contents/ui/EditContextMenu.qml --- a/applets/notifications/package/contents/ui/EditContextMenu.qml +++ b/applets/notifications/package/contents/ui/EditContextMenu.qml @@ -37,7 +37,7 @@ property string link - onStatusChanged: { + function onStatusChanged() { if (status === PlasmaComponents.DialogStatus.Closed) { closed(); } diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml --- a/applets/notifications/package/contents/ui/FullRepresentation.qml +++ b/applets/notifications/package/contents/ui/FullRepresentation.qml @@ -41,15 +41,15 @@ Layout.fillHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical // HACK forward focus to the list - onActiveFocusChanged: { + function onActiveFocusChanged() { if (activeFocus) { list.forceActiveFocus(); } } Connections { target: plasmoid - onExpandedChanged: { + function onExpandedChanged() { if (plasmoid.expanded) { list.positionViewAtBeginning(); list.currentIndex = -1; diff --git a/applets/notifications/package/contents/ui/JobDetails.qml b/applets/notifications/package/contents/ui/JobDetails.qml --- a/applets/notifications/package/contents/ui/JobDetails.qml +++ b/applets/notifications/package/contents/ui/JobDetails.qml @@ -70,7 +70,7 @@ visible: text !== "" // Only let the label grow, never shrink, to avoid repeatedly resizing the dialog when copying many files - onImplicitHeightChanged: { + function onImplicitHeightChanged() { if (implicitHeight > Layout.preferredHeight) { Layout.preferredHeight = implicitHeight; } diff --git a/applets/notifications/package/contents/ui/JobItem.qml b/applets/notifications/package/contents/ui/JobItem.qml --- a/applets/notifications/package/contents/ui/JobItem.qml +++ b/applets/notifications/package/contents/ui/JobItem.qml @@ -184,7 +184,7 @@ iconName: "application-menu" tooltip: i18nd("plasma_applet_org.kde.plasma.notifications", "More Options...") checkable: true - onPressedChanged: { + function onPressedChanged() { if (pressed) { checked = Qt.binding(function() { return otherFileActionsMenu.visible; diff --git a/applets/notifications/package/contents/ui/NotificationHeader.qml b/applets/notifications/package/contents/ui/NotificationHeader.qml --- a/applets/notifications/package/contents/ui/NotificationHeader.qml +++ b/applets/notifications/package/contents/ui/NotificationHeader.qml @@ -64,7 +64,7 @@ signal closeClicked // notification created/updated time changed - onTimeChanged: updateAgoText() + function onTimeChanged() { updateAgoText() } function updateAgoText() { ageLabel.agoText = ageLabel.generateAgoText(); @@ -78,7 +78,7 @@ Connections { target: Globals // clock time changed - onTimeChanged: notificationHeading.updateAgoText() + function onTimeChanged() { notificationHeading.updateAgoText() } } PlasmaCore.IconItem { diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml --- a/applets/notifications/package/contents/ui/NotificationPopup.qml +++ b/applets/notifications/package/contents/ui/NotificationPopup.qml @@ -108,7 +108,7 @@ visible: false // When notification is updated, restart hide timer - onTimeChanged: { + function onTimeChanged() { if (timer.running) { timer.restart(); } diff --git a/applets/notifications/package/contents/ui/SelectableLabel.qml b/applets/notifications/package/contents/ui/SelectableLabel.qml --- a/applets/notifications/package/contents/ui/SelectableLabel.qml +++ b/applets/notifications/package/contents/ui/SelectableLabel.qml @@ -89,7 +89,7 @@ onLinkActivated: bodyTextContainer.linkActivated(link) // ensure selecting text scrolls the view as needed... - onCursorRectangleChanged: { + function onCursorRectangleChanged() { var flick = bodyTextScrollArea.flickableItem if (flick.contentY >= cursorRectangle.y) { flick.contentY = cursorRectangle.y @@ -155,7 +155,7 @@ } // HACK to be able to select text whilst still getting all mouse events to the MouseArea - onPositionChanged: { + function onPositionChanged() { if (pressed) { var pos = bodyText.positionAt(mouseX, mouseY); if (selectionStart < pos) { diff --git a/applets/notifications/package/contents/ui/ThumbnailStrip.qml b/applets/notifications/package/contents/ui/ThumbnailStrip.qml --- a/applets/notifications/package/contents/ui/ThumbnailStrip.qml +++ b/applets/notifications/package/contents/ui/ThumbnailStrip.qml @@ -142,7 +142,7 @@ iconName: "application-menu" checkable: true - onPressedChanged: { + function onPressedChanged() { if (pressed) { // fake "pressed" while menu is open checked = Qt.binding(function() { diff --git a/applets/notifications/package/contents/ui/global/Globals.qml b/applets/notifications/package/contents/ui/global/Globals.qml --- a/applets/notifications/package/contents/ui/global/Globals.qml +++ b/applets/notifications/package/contents/ui/global/Globals.qml @@ -46,7 +46,7 @@ property bool inhibited: false - onInhibitedChanged: { + function onInhibitedChanged() { var pa = pulseAudio.item; if (!pa) { return; @@ -79,7 +79,7 @@ // HACK When a plasmoid is destroyed, QML sets its value to "null" in the Array // so we then remove it so we have a working "plasmoid" again - onPlasmoidChanged: { + function onPlasmoidChanged() { if (!plasmoid) { // this doesn't emit a change, only in ratePlasmoids() it will detect the change plasmoids.splice(0, 1); // remove first @@ -136,7 +136,7 @@ } readonly property QtObject focusDialog: plasmoid.nativeInterface.focussedPlasmaDialog - onFocusDialogChanged: positionPopups() + function onFocusDialogChanged() { positionPopups() } // The raw width of the popup's content item, the Dialog itself adds some margins // Make it wider when on the top or the bottom center, since there's more horizontal @@ -150,7 +150,7 @@ // How much vertical screen real estate the notification popups may consume readonly property real popupMaximumScreenFill: 0.75 - onPopupLocationChanged: Qt.callLater(positionPopups) + function onPopupLocationChanged() { Qt.callLater(positionPopups) } Component.onCompleted: checkInhibition() @@ -358,7 +358,7 @@ } property QtObject notificationSettings: NotificationManager.Settings { - onNotificationsInhibitedUntilChanged: globals.checkInhibition() + function onNotificationsInhibitedUntilChanged() { globals.checkInhibition() } } property QtObject tasksModel: TaskManager.TasksModel { @@ -372,7 +372,7 @@ connectedSources: ["Local"] interval: 60000 // 1 min intervalAlignment: PlasmaCore.Types.AlignToMinute - onDataChanged: { + function onDataChanged() { checkInhibition(); globals.timeChanged(); } @@ -502,7 +502,7 @@ onKillJobClicked: popupNotificationsModel.killJob(popupNotificationsModel.index(index, 0)) // popup width is fixed - onHeightChanged: positionPopups() + function onHeightChanged() { positionPopups() } Component.onCompleted: { if (model.type === NotificationManager.Notifications.NotificationType && model.desktopEntry) { @@ -554,8 +554,8 @@ property Connections screenWatcher: Connections { target: plasmoid - onAvailableScreenRectChanged: repositionTimer.start() - onScreenGeometryChanged: repositionTimer.start() + function onAvailableScreenRectChanged() { repositionTimer.start() } + function onScreenGeometryChanged() { repositionTimer.start() } } // Normally popups are repositioned through Qt.callLater but in case of e.g. screen geometry changes we want to compress that diff --git a/applets/notifications/package/contents/ui/main.qml b/applets/notifications/package/contents/ui/main.qml --- a/applets/notifications/package/contents/ui/main.qml +++ b/applets/notifications/package/contents/ui/main.qml @@ -38,7 +38,7 @@ || historyModel.unreadNotificationsCount > 0 || Globals.inhibited ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus - onEffectiveStatusChanged: { + function onEffectiveStatusChanged() { if (effectiveStatus === PlasmaCore.Types.PassiveStatus) { // HACK System Tray only lets applets self-hide when in Active state // When we clear the notifications, the status is updated right away diff --git a/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigAppearance.qml b/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigAppearance.qml --- a/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigAppearance.qml +++ b/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigAppearance.qml @@ -45,6 +45,6 @@ Connections { target: contentItem - onConfigurationChanged: root.configurationChanged() + function onConfigurationChanged() { root.configurationChanged() } } } diff --git a/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigSensors.qml b/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigSensors.qml --- a/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigSensors.qml +++ b/applets/systemmonitor/systemmonitor/package/contents/ui/config/ConfigSensors.qml @@ -47,6 +47,6 @@ Connections { target: contentItem - onConfigurationChanged: root.configurationChanged() + function onConfigurationChanged() { root.configurationChanged() } } } diff --git a/applets/systemmonitor/systemmonitor/package/contents/ui/config/FaceDetails.qml b/applets/systemmonitor/systemmonitor/package/contents/ui/config/FaceDetails.qml --- a/applets/systemmonitor/systemmonitor/package/contents/ui/config/FaceDetails.qml +++ b/applets/systemmonitor/systemmonitor/package/contents/ui/config/FaceDetails.qml @@ -40,6 +40,6 @@ Connections { target: contentItem - onConfigurationChanged: root.configurationChanged() + function onConfigurationChanged() { root.configurationChanged() } } } diff --git a/applets/systemtray/container/package/contents/ui/main.qml b/applets/systemtray/container/package/contents/ui/main.qml --- a/applets/systemtray/container/package/contents/ui/main.qml +++ b/applets/systemtray/container/package/contents/ui/main.qml @@ -39,7 +39,7 @@ } Connections { target: internalSystray - onExpandedChanged: plasmoid.expanded = internalSystray.expanded + function onExpandedChanged() { plasmoid.expanded = internalSystray.expanded } } property Item internalSystray @@ -56,7 +56,7 @@ Connections { target: plasmoid.nativeInterface - onInternalSystrayChanged: { + function onInternalSystrayChanged() { root.internalSystray = plasmoid.nativeInterface.internalSystray; root.internalSystray.parent = root; root.internalSystray.anchors.fill = root; diff --git a/applets/systemtray/package/contents/applet/CompactApplet.qml b/applets/systemtray/package/contents/applet/CompactApplet.qml --- a/applets/systemtray/package/contents/applet/CompactApplet.qml +++ b/applets/systemtray/package/contents/applet/CompactApplet.qml @@ -71,7 +71,7 @@ } } - onCompactRepresentationChanged: { + function onCompactRepresentationChanged() { if (compactRepresentation) { compactRepresentation.parent = appletRoot; compactRepresentation.anchors.fill = appletRoot; diff --git a/applets/systemtray/package/contents/ui/ConfigEntries.qml b/applets/systemtray/package/contents/ui/ConfigEntries.qml --- a/applets/systemtray/package/contents/ui/ConfigEntries.qml +++ b/applets/systemtray/package/contents/ui/ConfigEntries.qml @@ -255,7 +255,7 @@ visible: isPlasmoid enabled: visibilityComboBox.myCurrentValue !== "disabled" keySequence: model.applet ? model.applet.globalShortcut : "" - onKeySequenceChanged: { + function onKeySequenceChanged() { if (model.applet && keySequence !== model.applet.globalShortcut) { model.applet.globalShortcut = keySequence diff --git a/applets/systemtray/package/contents/ui/HiddenItemsView.qml b/applets/systemtray/package/contents/ui/HiddenItemsView.qml --- a/applets/systemtray/package/contents/ui/HiddenItemsView.qml +++ b/applets/systemtray/package/contents/ui/HiddenItemsView.qml @@ -76,7 +76,7 @@ onModelReset: hiddenTasksColumn.itemCount = hiddenTasksColumn.model.rowCount() onRowsInserted: hiddenTasksColumn.itemCount = hiddenTasksColumn.model.rowCount() onRowsRemoved: hiddenTasksColumn.itemCount = hiddenTasksColumn.model.rowCount() - onLayoutChanged: hiddenTasksColumn.itemCount = hiddenTasksColumn.model.rowCount() + function onLayoutChanged() { hiddenTasksColumn.itemCount = hiddenTasksColumn.model.rowCount() } } PlasmaComponents.Highlight { diff --git a/applets/systemtray/package/contents/ui/PlasmoidPopupsContainer.qml b/applets/systemtray/package/contents/ui/PlasmoidPopupsContainer.qml --- a/applets/systemtray/package/contents/ui/PlasmoidPopupsContainer.qml +++ b/applets/systemtray/package/contents/ui/PlasmoidPopupsContainer.qml @@ -44,7 +44,7 @@ property bool mergeFooters: appletHasFooter && activeApplet.fullRepresentationItem.footer.visible property int footerHeight: mergeFooters ? activeApplet.fullRepresentationItem.footer.height : 0 - onActiveAppletChanged: { + function onActiveAppletChanged() { mainStack.appletHasHeading = false mainStack.appletHasFooter = false if (activeApplet != null) { diff --git a/applets/systemtray/package/contents/ui/items/AbstractItem.qml b/applets/systemtray/package/contents/ui/items/AbstractItem.qml --- a/applets/systemtray/package/contents/ui/items/AbstractItem.qml +++ b/applets/systemtray/package/contents/ui/items/AbstractItem.qml @@ -62,7 +62,7 @@ //BEGIN CONNECTIONS - onContainsMouseChanged: { + function onContainsMouseChanged() { if (inHiddenLayout && containsMouse) { root.hiddenLayout.currentIndex = index } diff --git a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml --- a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml +++ b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml @@ -58,7 +58,7 @@ } } - onAppletChanged: { + function onAppletChanged() { if (applet) { applet.parent = plasmoidContainer.iconContainer applet.anchors.fill = applet.parent diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml --- a/applets/systemtray/package/contents/ui/main.qml +++ b/applets/systemtray/package/contents/ui/main.qml @@ -225,7 +225,7 @@ location: plasmoid.location hideOnWindowDeactivate: !plasmoid.configuration.pin - onVisibleChanged: { + function onVisibleChanged() { if (!visible) { plasmoid.status = PlasmaCore.Types.PassiveStatus; if (root.activeApplet) { diff --git a/components/containmentlayoutmanager/qml/BasicAppletContainer.qml b/components/containmentlayoutmanager/qml/BasicAppletContainer.qml --- a/components/containmentlayoutmanager/qml/BasicAppletContainer.qml +++ b/components/containmentlayoutmanager/qml/BasicAppletContainer.qml @@ -45,7 +45,7 @@ ? PlasmaCore.Theme.ComplementaryColorGroup : PlasmaCore.Theme.NormalColorGroup - onFocusChanged: { + function onFocusChanged() { if (!focus) { editMode = false; } diff --git a/kcms/translations/package/contents/ui/main.qml b/kcms/translations/package/contents/ui/main.qml --- a/kcms/translations/package/contents/ui/main.qml +++ b/kcms/translations/package/contents/ui/main.qml @@ -43,7 +43,7 @@ label: model.display checkable: true - onCheckedChanged: { + function onCheckedChanged() { if (checked) { addLanguagesSheet.selectedLanguages.push(index); @@ -66,7 +66,7 @@ data: [Connections { target: addLanguagesSheet - onSheetOpenChanged: languageItem.checked = false + function onSheetOpenChanged() { languageItem.checked = false } }] } } @@ -85,7 +85,7 @@ property var selectedLanguages: [] - onSheetOpenChanged: selectedLanguages = [] + function onSheetOpenChanged() { selectedLanguages = [] } ListView { id: availableLanguagesList diff --git a/ksplash/ksplashqml/themes/Classic/main.qml b/ksplash/ksplashqml/themes/Classic/main.qml --- a/ksplash/ksplashqml/themes/Classic/main.qml +++ b/ksplash/ksplashqml/themes/Classic/main.qml @@ -28,7 +28,7 @@ property int stage property int iconSize: 78 - onStageChanged: { + function onStageChanged() { if (stage == 1) { iconsBackgroundRect.opacity = 1 } diff --git a/ksplash/ksplashqml/themes/Minimalistic/main.qml b/ksplash/ksplashqml/themes/Minimalistic/main.qml --- a/ksplash/ksplashqml/themes/Minimalistic/main.qml +++ b/ksplash/ksplashqml/themes/Minimalistic/main.qml @@ -38,7 +38,7 @@ /* }}} */ /* JavaScript functions ---------------------------{{{ */ - onStageChanged: { + function onStageChanged() { if (stage == 1) { background.opacity = 1 gear.opacity = 0.5 diff --git a/lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml b/lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml --- a/lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml +++ b/lookandfeel/contents/desktopswitcher/DesktopSwitcher.qml @@ -153,7 +153,7 @@ boundsBehavior: Flickable.StopAtBounds Connections { target: tabBox - onCurrentIndexChanged: {listView.currentIndex = tabBox.currentIndex;} + function onCurrentIndexChanged() {listView.currentIndex = tabBox.currentIndex;} } } Component { @@ -171,7 +171,7 @@ id: desktopClientModel model: tabBox.model delegate: clientIconDelegate - onDesktopIndexChanged: { + function onDesktopIndexChanged() { desktopClientModel.rootIndex = desktopClientModel.parentModelIndex(); desktopClientModel.rootIndex = desktopClientModel.modelIndex(desktopClientModel.desktopIndex); } diff --git a/lookandfeel/contents/lockscreen/LockScreen.qml b/lookandfeel/contents/lockscreen/LockScreen.qml --- a/lookandfeel/contents/lockscreen/LockScreen.qml +++ b/lookandfeel/contents/lockscreen/LockScreen.qml @@ -38,7 +38,7 @@ id: mainLoader anchors.fill: parent opacity: 0 - onItemChanged: opacity = 1 + function onItemChanged() { opacity = 1 } focus: true diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -43,7 +43,7 @@ onFailed: { root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed"); } - onGraceLockedChanged: { + function onGraceLockedChanged() { if (!authenticator.graceLocked) { root.notification = ""; root.clearPassword(); @@ -99,15 +99,15 @@ hoverEnabled: true drag.filterChildren: true onPressed: uiVisible = true; - onPositionChanged: uiVisible = true; - onUiVisibleChanged: { + function onPositionChanged() { uiVisible = true; } + function onUiVisibleChanged() { if (blockUI) { fadeoutTimer.running = false; } else if (uiVisible) { fadeoutTimer.restart(); } } - onBlockUIChanged: { + function onBlockUIChanged() { if (blockUI) { fadeoutTimer.running = false; uiVisible = true; @@ -160,7 +160,7 @@ PropertyAnimation { id: stateChangeAnimation; properties: "y"; duration: 300; easing.type: Easing.InQuad} PropertyAnimation { properties: "opacity"; duration: 300} - onRunningChanged: { + function onRunningChanged() { // after the animation has finished switch session: since we only animate the transition TO state "onOtherSession" // and not the other way around, we don't have to check the state we transitioned into if (/* lockScreenRoot.state == "onOtherSession" && */ !running) { @@ -320,7 +320,7 @@ } Component.onCompleted: inputPanel.source = "../components/VirtualKeyboard.qml" - onKeyboardActiveChanged: { + function onKeyboardActiveChanged() { if (keyboardActive) { state = "visible"; } else { diff --git a/lookandfeel/contents/lockscreen/MainBlock.qml b/lookandfeel/contents/lockscreen/MainBlock.qml --- a/lookandfeel/contents/lockscreen/MainBlock.qml +++ b/lookandfeel/contents/lockscreen/MainBlock.qml @@ -34,7 +34,7 @@ //the y position that should be ensured visible when the on screen keyboard is visible property int visibleBoundary: mapFromItem(loginButton, 0, 0).y - onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing + function onHeightChanged() { visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing } /* * Login has been requested with the following username and password * If username field is visible, it will be taken from that, otherwise from the "name" property of the currentIndex diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/logout/Logout.qml --- a/lookandfeel/contents/logout/Logout.qml +++ b/lookandfeel/contents/logout/Logout.qml @@ -82,7 +82,7 @@ shortcut: "Escape" } - onRemainingTimeChanged: { + function onRemainingTimeChanged() { if (remainingTime <= 0) { root.currentAction(); } diff --git a/lookandfeel/contents/runcommand/RunCommand.qml b/lookandfeel/contents/runcommand/RunCommand.qml --- a/lookandfeel/contents/runcommand/RunCommand.qml +++ b/lookandfeel/contents/runcommand/RunCommand.qml @@ -32,13 +32,13 @@ LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft LayoutMirroring.childrenInherit: true - onQueryChanged: { + function onQueryChanged() { queryField.text = query; } Connections { target: runnerWindow - onVisibleChanged: { + function onVisibleChanged() { if (runnerWindow.visible) { queryField.forceActiveFocus(); listView.currentIndex = -1 @@ -123,7 +123,7 @@ } } - onTextChanged: { + function onTextChanged() { root.query = queryField.text if (allowCompletion && length > 0) { var history = runnerWindow.history @@ -265,7 +265,7 @@ Accessible.description: i18n("in category recent queries") } - onActiveFocusChanged: { + function onActiveFocusChanged() { if (!activeFocus && currentIndex == listView.count-1) { currentIndex = 0; } diff --git a/lookandfeel/contents/splash/Splash.qml b/lookandfeel/contents/splash/Splash.qml --- a/lookandfeel/contents/splash/Splash.qml +++ b/lookandfeel/contents/splash/Splash.qml @@ -26,7 +26,7 @@ property int stage - onStageChanged: { + function onStageChanged() { if (stage == 2) { introAnimation.running = true; } else if (stage == 5) { diff --git a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml --- a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml +++ b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml @@ -61,7 +61,7 @@ Connections { target: tabBox - onCurrentIndexChanged: { + function onCurrentIndexChanged() { thumbnailListView.currentIndex = tabBox.currentIndex; thumbnailListView.positionViewAtIndex(thumbnailListView.currentIndex, ListView.Contain) } diff --git a/sddm-theme/Login.qml b/sddm-theme/Login.qml --- a/sddm-theme/Login.qml +++ b/sddm-theme/Login.qml @@ -17,13 +17,13 @@ //the y position that should be ensured visible when the on screen keyboard is visible property int visibleBoundary: mapFromItem(loginButton, 0, 0).y - onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing + function onHeightChanged() { visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing } property int fontSize: config.fontSize signal loginRequest(string username, string password) - onShowUsernamePromptChanged: { + function onShowUsernamePromptChanged() { if (!showUsernamePrompt) { lastUserName = "" } diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml --- a/sddm-theme/Main.qml +++ b/sddm-theme/Main.qml @@ -78,15 +78,15 @@ hoverEnabled: true drag.filterChildren: true onPressed: uiVisible = true; - onPositionChanged: uiVisible = true; - onUiVisibleChanged: { + function onPositionChanged() { uiVisible = true; } + function onUiVisibleChanged() { if (blockUI) { fadeoutTimer.running = false; } else if (uiVisible) { fadeoutTimer.restart(); } } - onBlockUIChanged: { + function onBlockUIChanged() { if (blockUI) { fadeoutTimer.running = false; uiVisible = true; @@ -246,7 +246,7 @@ id: inputPanel state: "hidden" property bool keyboardActive: item ? item.active : false - onKeyboardActiveChanged: { + function onKeyboardActiveChanged() { if (keyboardActive) { state = "visible" } else { @@ -509,7 +509,7 @@ } } - onNotificationMessageChanged: { + function onNotificationMessageChanged() { if (notificationMessage) { notificationResetTimer.start(); } diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml --- a/wallpapers/image/imagepackage/contents/ui/config.qml +++ b/wallpapers/image/imagepackage/contents/ui/config.qml @@ -58,23 +58,23 @@ // Lock screen configuration case return Qt.size(Screen.width, Screen.height) } - onSlidePathsChanged: cfg_SlidePaths = slidePaths - onUncheckedSlidesChanged: cfg_UncheckedSlides = uncheckedSlides - onSlideshowModeChanged: cfg_SlideshowMode = slideshowMode + function onSlidePathsChanged() { cfg_SlidePaths = slidePaths } + function onUncheckedSlidesChanged() { cfg_UncheckedSlides = uncheckedSlides } + function onSlideshowModeChanged() { cfg_SlideshowMode = slideshowMode } } - onCfg_FillModeChanged: { + function onCfg_FillModeChanged() { resizeComboBox.setMethod() } - onCfg_SlidePathsChanged: { + function onCfg_SlidePathsChanged() { imageWallpaper.slidePaths = cfg_SlidePaths } - onCfg_UncheckedSlidesChanged: { + function onCfg_UncheckedSlidesChanged() { imageWallpaper.uncheckedSlides = cfg_UncheckedSlides } - onCfg_SlideshowModeChanged: { + function onCfg_SlideshowModeChanged() { imageWallpaper.slideshowMode = cfg_SlideshowMode } @@ -113,7 +113,7 @@ ] textRole: "label" - onCurrentIndexChanged: cfg_FillMode = model[currentIndex]["fillMode"] + function onCurrentIndexChanged() { cfg_FillMode = model[currentIndex]["fillMode"] } Component.onCompleted: setMethod(); function setMethod() { @@ -154,7 +154,7 @@ } ] textRole: "label" - onCurrentIndexChanged: { + function onCurrentIndexChanged() { cfg_SlideshowMode = model[currentIndex]["slideshowMode"]; } Component.onCompleted: setMethod(); @@ -198,9 +198,9 @@ 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 { @@ -213,7 +213,7 @@ from: 0 to: 24 editable: true - onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value + function onValueChanged() { cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value } textFromValue: function(value, locale) { return i18ndp("plasma_wallpaper_org.kde.image","%1 hour", "%1 hours", value) @@ -228,7 +228,7 @@ from: 0 to: 60 editable: true - onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value + function onValueChanged() { cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value } textFromValue: function(value, locale) { return i18ndp("plasma_wallpaper_org.kde.image","%1 minute", "%1 minutes", value) @@ -243,7 +243,7 @@ from: root.hoursIntervalValue === 0 && root.minutesIntervalValue === 0 ? 1 : 0 to: 60 editable: true - onValueChanged: cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value + function onValueChanged() { cfg_SlideInterval = hoursInterval.value * 3600 + minutesInterval.value * 60 + secondsInterval.value } textFromValue: function(value, locale) { return i18ndp("plasma_wallpaper_org.kde.image","%1 second", "%1 seconds", value) @@ -344,7 +344,7 @@ configFile: "wallpaper.knsrc" text: i18nd("plasma_wallpaper_org.kde.image", "Get New Wallpapers...") viewMode: NewStuff.Page.ViewMode.Preview - onChangedEntriesChanged: imageWallpaper.newStuffFinished(); + function onChangedEntriesChanged() { imageWallpaper.newStuffFinished(); } } } } @@ -371,7 +371,7 @@ Connections { target: root - onCfg_ImageChanged: resetCurrentIndex() + function onCfg_ImageChanged() { resetCurrentIndex() } } //kill the space for label under thumbnails @@ -443,7 +443,7 @@ configFile: "wallpaper.knsrc" text: i18nd("plasma_wallpaper_org.kde.image", "Get New Wallpapers...") viewMode: NewStuff.Page.ViewMode.Preview - onChangedEntriesChanged: imageWallpaper.newStuffFinished(); + function onChangedEntriesChanged() { imageWallpaper.newStuffFinished(); } } } } diff --git a/wallpapers/image/imagepackage/contents/ui/main.qml b/wallpapers/image/imagepackage/contents/ui/main.qml --- a/wallpapers/image/imagepackage/contents/ui/main.qml +++ b/wallpapers/image/imagepackage/contents/ui/main.qml @@ -51,7 +51,7 @@ //private - onConfiguredImageChanged: { + function onConfiguredImageChanged() { if (modelImage != configuredImage && configuredImage != "") { imageWallpaper.addUrl(configuredImage); } @@ -76,15 +76,15 @@ uncheckedSlides: wallpaper.configuration.UncheckedSlides } - onFillModeChanged: Qt.callLater(loadImage); - onModelImageChanged:{ + function onFillModeChanged() { Qt.callLater(loadImage); } + function onModelImageChanged(){ Qt.callLater(loadImage); wallpaper.configuration.Image = modelImage; } - onConfigColorChanged: Qt.callLater(loadImage); - onBlurChanged: Qt.callLater(loadImage); - onWidthChanged: Qt.callLater(loadImage); - onHeightChanged: Qt.callLater(loadImage); + function onConfigColorChanged() { Qt.callLater(loadImage); } + function onBlurChanged() { Qt.callLater(loadImage); } + function onWidthChanged() { Qt.callLater(loadImage); } + function onHeightChanged() { Qt.callLater(loadImage); } function loadImage() { var isFirst = (root.currentItem == undefined); diff --git a/wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml b/wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml --- a/wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml +++ b/wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml @@ -59,7 +59,7 @@ delegate: WallpaperDelegate {} - onCountChanged: { + function onCountChanged() { wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) } diff --git a/wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml b/wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml --- a/wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml +++ b/wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml @@ -47,7 +47,7 @@ model: imageWallpaper.wallpaperModel property int currentIndex: -1 - onCurrentIndexChanged: { + function onCurrentIndexChanged() { currentPage = Math.max(0, Math.floor(currentIndex/pageSize)) } anchors { @@ -63,7 +63,7 @@ delegate: WallpaperDelegate {} - onCountChanged: { + function onCountChanged() { wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) }