Commit 31cef000 authored by Konrad Materka's avatar Konrad Materka
Browse files

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 c33bb619
......@@ -69,7 +69,9 @@ Item {
Connections {
target: PlasmaCore.Units.iconSizeHints
onPanelChanged: root.updateSizeHints()
function onPanelChanged() {
root.updateSizeHints()
}
}
PlasmaCore.IconItem {
......
......@@ -124,7 +124,7 @@ Kicker.DashboardWindow {
Connections {
target: kicker
onReset: {
function onReset() {
if (!root.searching) {
filterList.applyFilter();
......@@ -134,8 +134,8 @@ Kicker.DashboardWindow {
}
}
onDragSourceChanged: {
if (!dragSource) {
function onDragSourceChanged() {
if (!kicker.dragSource) {
// FIXME TODO HACK: Reset all views post-DND to work around
// mouse grab bug despite QQuickWindow::mouseGrabberItem==0x0.
// Needs a more involved hunt through Qt Quick sources later since
......@@ -161,7 +161,7 @@ Kicker.DashboardWindow {
Connections {
target: plasmoid
onUserConfiguringChanged: {
function onUserConfiguringChanged() {
if (plasmoid.userConfiguring) {
root.hide()
}
......
......@@ -125,7 +125,7 @@ Item {
Connections {
target: globalFavorites
onFavoritesChanged: {
function onFavoritesChanged() {
plasmoid.configuration.favoriteApps = target.favorites;
}
}
......@@ -133,7 +133,7 @@ Item {
Connections {
target: systemFavorites
onFavoritesChanged: {
function onFavoritesChanged() {
plasmoid.configuration.favoriteSystemActions = target.favorites;
}
}
......@@ -141,11 +141,11 @@ Item {
Connections {
target: plasmoid.configuration
onFavoriteAppsChanged: {
function onFavoriteAppsChanged() {
globalFavorites.favorites = plasmoid.configuration.favoriteApps;
}
onFavoriteSystemActionsChanged: {
function onFavoriteSystemActionsChanged() {
systemFavorites.favorites = plasmoid.configuration.favoriteSystemActions;
}
}
......@@ -243,7 +243,7 @@ Item {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
if (expanded) {
windowSystem.monitorWindowVisibility(plasmoid.fullRepresentationItem);
justOpenedTimer.start();
......
......@@ -40,7 +40,7 @@ BaseView {
Connections {
target: computerModel
onSystemApplicationsChanged: {
function onSystemApplicationsChanged() {
plasmoid.configuration.systemApplications = target.systemApplications;
}
}
......@@ -48,7 +48,7 @@ BaseView {
Connections {
target: plasmoid.configuration
onSystemApplicationsChanged: {
function onSystemApplicationsChanged() {
computerModel.systemApplications = plasmoid.configuration.systemApplications;
}
}
......
......@@ -57,7 +57,7 @@ Item {
Connections {
target: header
onQueryChanged: {
function onQueryChanged() {
runnerModel.query = header.query;
searchView.currentIndex = 0;
......@@ -70,7 +70,7 @@ Item {
Connections {
target: runnerModel
onCountChanged: {
function onCountChanged() {
if (runnerModel.count && !searchView.model) {
searchView.model = runnerModel.modelForRow(0);
}
......
......@@ -96,14 +96,14 @@ Item {
target: tasksModel
enabled: root.active
onActiveTaskChanged: {
function onActiveTaskChanged() {
if (tasksModel.activeTask.valid) { //to suppress changing focus to non windows, such as the desktop
root.active = false;
root.minimizedClients = [];
}
}
onVirtualDesktopChanged: deactivate()
onActivityChanged: deactivate()
function onVirtualDesktopChanged() {deactivate()}
function onActivityChanged() {deactivate()}
}
PlasmaCore.FrameSvgItem {
......
......@@ -304,9 +304,9 @@ PlasmaComponents.ContextMenu {
Connections {
target: virtualDesktopInfo
onNumberOfDesktopsChanged: Qt.callLater(virtualDesktopsMenu.refresh)
onDesktopIdsChanged: Qt.callLater(virtualDesktopsMenu.refresh)
onDesktopNamesChanged: Qt.callLater(virtualDesktopsMenu.refresh)
function onNumberOfDesktopsChanged() {Qt.callLater(virtualDesktopsMenu.refresh)}
function onDesktopIdsChanged() {Qt.callLater(virtualDesktopsMenu.refresh)}
function onDesktopNamesChanged() {Qt.callLater(virtualDesktopsMenu.refresh)}
}
PlasmaComponents.ContextMenu {
......@@ -384,7 +384,9 @@ PlasmaComponents.ContextMenu {
Connections {
target: activityInfo
onNumberOfRunningActivitiesChanged: activitiesDesktopsMenu.refresh()
function onNumberOfRunningActivitiesChanged() {
activitiesDesktopsMenu.refresh()
}
}
PlasmaComponents.ContextMenu {
......@@ -653,7 +655,9 @@ PlasmaComponents.ContextMenu {
Connections {
target: activityInfo
onNumberOfRunningActivitiesChanged: activitiesDesktopsMenu.refresh()
function onNumberOfRunningActivitiesChanged() {
activitiesDesktopsMenu.refresh()
}
}
PlasmaComponents.ContextMenu {
......
......@@ -77,7 +77,7 @@ FocusScope {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
if (!expanded) {
windowListView.currentIndex = 0;
}
......
......@@ -159,7 +159,7 @@ ColumnLayout {
Connections {
target: mimeTypesView
onToggleCurrent: {
function onToggleCurrent() {
if (styleData.row === mimeTypesView.currentRow) {
model.checked = !checkBox.checked
}
......
......@@ -160,7 +160,7 @@ FocusScope {
Connections {
target: dir
onPopupMenuAboutToShow: {
function onPopupMenuAboutToShow(dropJob, mimeData, x, y) {
if (root.isContainment && !plasmoid.immutable) {
plasmoid.processMimeData(mimeData, x, y, dropJob);
}
......@@ -169,7 +169,7 @@ FocusScope {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged() {
if (plasmoid.expanded && dir.status === Folder.FolderModel.Ready && !gridView.model) {
gridView.model = positioner;
}
......@@ -209,7 +209,7 @@ FocusScope {
Connections {
target: root
onIsPopupChanged: {
function onIsPopupChanged() {
if (backButton == null && root.useListViewMode) {
backButton = makeBackButton();
} else if (backButton != null) {
......@@ -1133,7 +1133,7 @@ FocusScope {
Connections {
target: units
onIconSizesChanged: {
function onIconSizesChanged() {
gridView.iconSize = gridView.makeIconSize();
}
}
......@@ -1141,26 +1141,18 @@ FocusScope {
Connections {
target: plasmoid.configuration
onIconSizeChanged: {
function onIconSizeChanged() {
gridView.iconSize = gridView.makeIconSize();
}
}
Connections {
target: plasmoid.configuration
onViewModeChanged: {
function onViewModeChanged() {
gridView.iconSize = gridView.makeIconSize();
}
}
Connections {
target: plasmoid.configuration
onUrlChanged: {
history = [];
updateHistory();
}
function onUrlChanged() {
history = [];
updateHistory();
}
}
}
}
......
......@@ -167,7 +167,7 @@ FocusScope {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged() {
if (root.isPopup) {
if (plasmoid.expanded) {
folderView.currentIndex = -1;
......@@ -183,7 +183,7 @@ FocusScope {
}
}
onExternalData: {
function onExternalData(mimetype, data) {
plasmoid.configuration.url = data
}
}
......@@ -191,36 +191,36 @@ FocusScope {
Connections {
target: plasmoid.configuration
onArrangementChanged: {
function onArrangementChanged() {
viewPropertiesMenu.arrangement = plasmoid.configuration.arrangement;
}
onAlignmentChanged: {
function onAlignmentChanged() {
viewPropertiesMenu.alignment = plasmoid.configuration.alignment;
}
onLockedChanged: {
function onLockedChanged() {
viewPropertiesMenu.locked = plasmoid.configuration.locked;
}
onSortModeChanged: {
function onSortModeChanged() {
folderView.sortMode = plasmoid.configuration.sortMode;
viewPropertiesMenu.sortMode = plasmoid.configuration.sortMode;
}
onSortDescChanged: {
function onSortDescChanged() {
viewPropertiesMenu.sortDesc = plasmoid.configuration.sortDesc;
}
onSortDirsFirstChanged: {
function onSortDirsFirstChanged() {
viewPropertiesMenu.sortDirsFirst = plasmoid.configuration.sortDirsFirst;
}
onIconSizeChanged: {
function onIconSizeChanged() {
viewPropertiesMenu.iconSize = plasmoid.configuration.iconSize;
}
onPositionsChanged: {
function onPositionsChanged() {
folderView.positions = plasmoid.configuration.positions;
}
}
......@@ -298,7 +298,7 @@ FocusScope {
Connections {
target: folderView
onUrlChanged: {
function onUrlChanged() {
if (!label.homeButton && folderView.url !== plasmoid.configuration.url) {
label.homeButton = homeButtonComponent.createObject(label);
} else if (label.homeButton && folderView.url === plasmoid.configuration.url) {
......
......@@ -274,7 +274,9 @@ FolderViewDropArea {
Connections {
target: plasmoid
ignoreUnknownSignals: true
onEditModeChanged: appletsLayout.editMode = plasmoid.editMode
function onEditModeChanged() {
appletsLayout.editMode = plasmoid.editMode
}
}
ContainmentLayoutManager.AppletsLayout {
......@@ -345,7 +347,7 @@ FolderViewDropArea {
target: folderViewLayer.view
// `FolderViewDropArea` is not a FocusScope. We need to forward manually.
onPressed: {
function onPressed() {
folderViewLayer.forceActiveFocus();
}
}
......
......@@ -254,10 +254,10 @@ MouseArea {
Connections {
target: currentApplet
onXChanged: handle.x = currentApplet.x
onYChanged: handle.y = currentApplet.y
onWidthChanged: handle.width = currentApplet.width
onHeightChanged: handle.height = currentApplet.height
function onXChanged() {handle.x = currentApplet.x}
function onYChanged() {handle.y = currentApplet.y}
function onWidthChanged() {handle.width = currentApplet.width}
function onHeightChanged() {handle.height = currentApplet.height}
}
Rectangle {
......
......@@ -49,7 +49,9 @@ Item {
Connections {
target: configDialog.currentContainmentActionsModel
onConfigurationChanged: root.configurationChanged()
function onConfigurationChanged() {
root.configurationChanged()
}
}
GridLayout {
......
......@@ -46,7 +46,7 @@ Item {
Connections {
target: kcm
onNeedsSaveChanged: {
function onNeedsSaveChanged() {
if (kcm.needsSave) {
page.configurationChanged();
}
......
......@@ -59,14 +59,22 @@ PlasmaCore.FrameSvgItem {
//BEGIN Connections
Connections {
target: panel
onOffsetChanged: ruler.offset = panel.offset
onMinimumLengthChanged: ruler.minimumLength = panel.minimumLength
onMaximumLengthChanged: ruler.maximumLength = panel.maximumLength
function onOffsetChanged() {
ruler.offset = panel.offset
}
function onMinimumLengthChanged() {
ruler.minimumLength = panel.minimumLength
}
function onMaximumLengthChanged() {
ruler.maximumLength = panel.maximumLength
}
}
Connections {
target: plasmoid
onImmutableChanged: configDialog.close()
function onImmutableChanged() {
configDialog.close()
}
}
//END Connections
......
......@@ -47,7 +47,9 @@ PlasmaCore.FrameSvgItem {
*/
Connections {
target: panel
onAlignmentChanged: offset = 0
function onAlignmentChanged() {
offset = 0
}
}
Component.onCompleted: {
......
......@@ -92,8 +92,12 @@ PlasmaCore.SvgItem {
onAlignmentChanged: syncPos()
Connections {
target: root.parent
onWidthChanged: syncPos()
onHeightChanged: syncPos()
function onWidthChanged() {
syncPos()
}
function onHeightChanged() {
syncPos()
}
}
MouseArea {
......
......@@ -152,7 +152,7 @@ Item {
Connections {
target: configDialog
onVisibleChanged: {
function onVisibleChanged() {
if (!configDialog.visible) {
settingsButton.checked = false
}
......
......@@ -123,7 +123,7 @@ PlasmaCore.Dialog {
Connections {
target: mainList
onCurrentIndexChanged: {
function onCurrentIndexChanged() {
if (mainList.currentIndex === index) {
root.currentPlugin = model.pluginName
}
......
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