Commit 15d8b8ec 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 8f4dfaec
......@@ -236,7 +236,7 @@ QQC2.Control {
Connections {
target: plasmoid;
onPopupEvent: {
function onPopupEvent() {
main.focus = true;
}
}
......
......@@ -270,7 +270,7 @@ Item {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged() {
if (plasmoid.expanded) {
fullRoot.forceActiveFocus()
}
......
......@@ -48,11 +48,11 @@ Item {
Connections {
target: plasmoid.nativeInterface
onComicsModelChanged: {
function onComicsModelChanged() {
comicTabbar.currentTab = comicTabbar.layout.children[1];
}
onTabHighlightRequest: {
function onTabHighlightRequest(id, highlight) {
for (var i = 0; i < comicTabbar.layout.children.length; ++i) {
var button = comicTabbar.layout.children[i];
......@@ -62,7 +62,7 @@ Item {
}
}
onShowNextNewStrip: {
function onShowNextNewStrip() {
var firstButton = undefined;
for (var i = 0; i < comicTabbar.layout.children.length; ++i) {
......
......@@ -54,7 +54,7 @@ Item {
// uninstalling filelight, the selection highlight remains fixed (which is wrong)
Connections {
target: diskQuota
onCleanUpToolInstalledChanged: {
function onCleanUpToolInstalledChanged() {
if (!diskQuota.cleanUpToolInstalled) {
listView.currentIndex = -1
}
......
......@@ -231,7 +231,7 @@ Item {
Connections {
target: plasmoid.configuration
onBoardSizeChanged: {
function onBoardSizeChanged() {
main.fillBoard();
solvedImage.update();
}
......@@ -239,7 +239,7 @@ Item {
Connections {
target: plasmoid.configuration
onImagePathChanged: {
function onImagePathChanged() {
main.fillBoard();
solvedImage.update();
}
......
......@@ -33,7 +33,7 @@ Item {
Connections {
target: plasmoid.nativeInterface
onInternalContainmentItemChanged: {
function onInternalContainmentItemChanged() {
root.internalContainmentItem = plasmoid.nativeInterface.internalContainmentItem;
root.internalContainmentItem.parent = root;
root.internalContainmentItem.anchors.fill = root;
......
......@@ -90,12 +90,16 @@ PlasmaCore.ToolTipArea {
Connections {
target: plasmoid.action("configure")
onTriggered: plasmoid.expanded = false
function onTriggered() {
plasmoid.expanded = false
}
}
Connections {
target: plasmoid
onContextualActionsAboutToShow: root.hideToolTip()
function onContextualActionsAboutToShow() {
root.hideToolTip()
}
}
PlasmaCore.Dialog {
......
......@@ -50,9 +50,9 @@ Kirigami.FormLayout {
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}
}
SpinBox {
id: hoursInterval
......
......@@ -75,7 +75,9 @@ Item {
Connections {
target: plasmoid.configuration
onPathListChanged: loadPathList()
function onPathListChanged() {
loadPathList()
}
}
function addItem(item) {
......@@ -129,7 +131,7 @@ Item {
Connections {
target: items
onItemChanged: {
function onItemChanged(path) {
console.log("item",path,"changed")
activeSource = ""
setActiveSource(path)
......@@ -443,7 +445,7 @@ Item {
Connections {
target: plasmoid
onExternalData: {
function onExternalData(mimetype, data) {
var type = items.isDir(data) ? "folder" : "file";
var item = {
"path": data,
......
......@@ -64,17 +64,17 @@ PlasmaCore.SvgItem {
Connections {
target: plasmoid
onExpandedChanged: {
function onExpandedChanged(expanded) {
// don't autofocus when we're on the desktop
if (expanded && (plasmoid.formFactor === PlasmaCore.Types.Vertical || plasmoid.formFactor === PlasmaCore.Types.Horizontal)) {
mainTextArea.forceActiveFocus()
}
}
onActivated: {
function onActivated() {
// FIXME doing forceActiveFocus here directly doesn't work
forceFocusTimer.restart()
}
onExternalData: {
function onExternalData(mimetype, data) {
// if we dropped a text file, we want its contents,
// otherwise we take the external data verbatim
var contents = NotesHelper.fileContents(data) || data
......
......@@ -77,7 +77,7 @@ Item {
Connections {
target: plasmoid.configuration
onPopupUrlsChanged: {
function onPopupUrlsChanged() {
popupModel.urlsChanged.disconnect(saveConfiguration);
popupModel.setUrls(plasmoid.configuration.popupUrls);
popupModel.urlsChanged.connect(saveConfiguration);
......
......@@ -243,7 +243,7 @@ Item {
Connections {
target: plasmoid.configuration
onLauncherUrlsChanged: {
function onLauncherUrlsChanged() {
launcherModel.urlsChanged.disconnect(saveConfiguration);
launcherModel.setUrls(plasmoid.configuration.launcherUrls);
launcherModel.urlsChanged.connect(saveConfiguration);
......
......@@ -149,13 +149,13 @@ ColumnLayout {
Connections {
target: plasmoid.configuration
onMinViewWidthChanged: updateZoomTimer.start()
function onMinViewWidthChanged() {updateZoomTimer.start()}
onUseMinViewWidthChanged: updateZoomTimer.start()
function onUseMinViewWidthChanged() {updateZoomTimer.start()}
onConstantZoomFactorChanged: updateZoomTimer.start()
function onConstantZoomFactorChanged() {updateZoomTimer.start()}
onUseConstantZoomChanged: updateZoomTimer.start()
function onUseConstantZoomChanged() {updateZoomTimer.start()}
}
onLinkHovered: {
......
......@@ -93,7 +93,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {listView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {listView.currentIndex = tabBox.currentIndex;}
}
}
Item {
......@@ -132,7 +132,7 @@ KWin.Switcher {
Component.onCompleted: textItem.calculateMaxWidth()
Connections {
target: dialogMainItem
onWidthChanged: {
function onWidthChanged() {
textItem.calculateMaxWidth();
textItem.constrainWidth();
}
......
......@@ -46,7 +46,7 @@ KWin.Switcher {
}
Connections {
target: tabBox
onCurrentIndexChanged: {icons.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {icons.currentIndex = tabBox.currentIndex;}
}
}
Item {
......@@ -83,7 +83,7 @@ KWin.Switcher {
Component.onCompleted: textItem.calculateMaxWidth()
Connections {
target: dialogMainItem
onWidthChanged: {
function onWidthChanged() {
textItem.calculateMaxWidth();
textItem.constrainWidth();
}
......
......@@ -157,7 +157,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {compactListView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {compactListView.currentIndex = tabBox.currentIndex;}
}
}
/*
......
......@@ -171,7 +171,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {listView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {listView.currentIndex = tabBox.currentIndex;}
}
}
......
......@@ -122,7 +122,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {thumbnailListView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {thumbnailListView.currentIndex = tabBox.currentIndex;}
}
}
/*
......
......@@ -45,7 +45,7 @@ KWin.Switcher {
}
Connections {
target: tabBox
onCurrentIndexChanged: {icons.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {icons.currentIndex = tabBox.currentIndex;}
}
}
Item {
......
......@@ -127,7 +127,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {textListView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {textListView.currentIndex = tabBox.currentIndex;}
}
}
/*
......
......@@ -216,7 +216,7 @@ KWin.Switcher {
Connections {
target: tabBox
onCurrentIndexChanged: {
function onCurrentIndexChanged() {
thumbnailGridView.currentIndex = tabBox.currentIndex;
}
}
......
......@@ -99,7 +99,7 @@ KWin.Switcher {
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {thumbnailListView.currentIndex = tabBox.currentIndex;}
function onCurrentIndexChanged() {thumbnailListView.currentIndex = tabBox.currentIndex;}
}
}
Item {
......@@ -149,7 +149,7 @@ KWin.Switcher {
Component.onCompleted: textItem.calculateMaxWidth()
Connections {
target: dialogMainItem
onWidthChanged: {
function onWidthChanged() {
textItem.calculateMaxWidth();
textItem.constrainWidth();
}
......
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