diff --git a/src/controls/FormLayout.qml b/src/controls/FormLayout.qml --- a/src/controls/FormLayout.qml +++ b/src/controls/FormLayout.qml @@ -249,7 +249,9 @@ Component.onCompleted: item.x = x + lay.x; Connections { target: lay - onXChanged: item.x = x + lay.x; + function onXChanged() { + item.x = x + lay.x; + } } } } diff --git a/src/controls/private/ActionButton.qml b/src/controls/private/ActionButton.qml --- a/src/controls/private/ActionButton.qml +++ b/src/controls/private/ActionButton.qml @@ -204,15 +204,15 @@ } Connections { target: root.hasGlobalDrawer ? globalDrawer : null - onPositionChanged: { + function onPositionChanged() { if ( globalDrawer && globalDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { button.x = globalDrawer.contentItem.width * globalDrawer.position + root.width/2 - button.width/2; } } } Connections { target: root.hasContextDrawer ? contextDrawer : null - onPositionChanged: { + function onPositionChanged() { if (contextDrawer && contextDrawer.modal && !mouseArea.pressed && !edgeMouseArea.pressed && !fakeContextMenuButton.pressed) { button.x = root.width/2 - button.width/2 - contextDrawer.contentItem.width * contextDrawer.position; } diff --git a/src/controls/private/RefreshableScrollView.qml b/src/controls/private/RefreshableScrollView.qml --- a/src/controls/private/RefreshableScrollView.qml +++ b/src/controls/private/RefreshableScrollView.qml @@ -143,7 +143,7 @@ Connections { enabled: typeof applicationWindow !== "undefined" target: typeof applicationWindow !== "undefined" ? applicationWindow() : null - onReachableModeChanged: { + function onReachableModeChanged() { overshootResetTimer.running = applicationWindow().reachableMode; } } diff --git a/src/controls/private/globaltoolbar/BreadcrumbControl.qml b/src/controls/private/globaltoolbar/BreadcrumbControl.qml --- a/src/controls/private/globaltoolbar/BreadcrumbControl.qml +++ b/src/controls/private/globaltoolbar/BreadcrumbControl.qml @@ -23,7 +23,7 @@ Connections { target: pageRow - onCurrentIndexChanged: { + function onCurrentIndexChanged() { var currentItem = mainLayout.children[pageRow.currentIndex]; listScrollAnim.running = false listScrollAnim.from = root.contentX; diff --git a/src/controls/templates/AbstractApplicationHeader.qml b/src/controls/templates/AbstractApplicationHeader.qml --- a/src/controls/templates/AbstractApplicationHeader.qml +++ b/src/controls/templates/AbstractApplicationHeader.qml @@ -75,7 +75,7 @@ } Connections { target: __appWindow - onControlsVisibleChanged: { + function onControlsVisibleChanged() { heightAnim.from = root.implicitHeight heightAnim.to = __appWindow.controlsVisible ? root.preferredHeight : 0; heightAnim.restart(); @@ -97,7 +97,9 @@ Connections { target: root.page ? root.page.globalToolBarItem : null enabled: headerSlideConnection.passive && target - onImplicitHeightChanged: root.implicitHeight = root.page.globalToolBarItem.implicitHeight + function onImplicitHeightChanged() { + root.implicitHeight = root.page.globalToolBarItem.implicitHeight + } } Connections { @@ -111,7 +113,7 @@ //A better solution is needed readonly property bool passive: root.pageRow && parent.parent == root.pageRow && root.pageRow.globalToolBar.actualStyle !== ApplicationHeaderStyle.TabBar && root.pageRow.globalToolBar.actualStyle != ApplicationHeaderStyle.Breadcrumb - onContentYChanged: { + function onContentYChanged() { if (updatingContentY || !Settings.isMobile || (__appWindow && !__appWindow.controlsVisible) || !root.page) { @@ -144,7 +146,7 @@ } } - onMovementEnded: { + function onMovementEnded() { if ((root.pageRow ? root.pageRow.wideMode : (__appWindow && __appWindow.wideScreen)) || !Settings.isMobile) { return; } @@ -157,7 +159,7 @@ } Connections { target: pageRow - onCurrentItemChanged: { + function onCurrentItemChanged() { if (!root.page) { return; } diff --git a/src/controls/templates/ApplicationHeader.qml b/src/controls/templates/ApplicationHeader.qml --- a/src/controls/templates/ApplicationHeader.qml +++ b/src/controls/templates/ApplicationHeader.qml @@ -369,7 +369,7 @@ } Connections { target: titleList.scrollingLocked ? pageRow.contentItem : null - onContentXChanged: { + function onContentXChanged() { if (!titleList.dragging && !titleList.movingHorizontally && !titleList.scrollMutex) { titleList.contentX = pageRow.contentItem.contentX - pageRow.contentItem.originX + titleList.originX; } diff --git a/src/controls/templates/OverlayDrawer.qml b/src/controls/templates/OverlayDrawer.qml --- a/src/controls/templates/OverlayDrawer.qml +++ b/src/controls/templates/OverlayDrawer.qml @@ -290,12 +290,12 @@ //NOTE: this is NOT a binding, otherwise it causes a binding loop in implicitHeight Connections { target: parent - onWidthChanged: { + function onWidthChanged() { if (edge === Qt.TopEdge || edge === Qt.BottomEdge) { width = parent.width; } } - onHeightChanged: { + function onHeightChanged() { if (edge === Qt.LeftEdge || edge === Qt.RightEdge) { height = parent.height; } diff --git a/src/controls/templates/OverlaySheet.qml b/src/controls/templates/OverlaySheet.qml --- a/src/controls/templates/OverlaySheet.qml +++ b/src/controls/templates/OverlaySheet.qml @@ -221,7 +221,7 @@ onWidthChanged: updateContentWidth() Connections { target: typeof contentItem.contentItem === "undefined" ? null : contentItem.contentItem - onWidthChanged: { + function onWidthChanged() { if (!mainItem.ownSizeUpdate) { mainItem.updateContentWidth(); } @@ -406,7 +406,9 @@ target: scrollView.flickableItem onContentYChanged: footerItem.y = Math.min(mainItem.height, mainItem.mapFromItem(flickableContents, 0, flickableContents.height).y) - footerItem.height; - onHeightChanged: scrollView.flickableItem.contentYChanged() + function onHeightChanged() { + scrollView.flickableItem.contentYChanged() + } } z: 2 Item { @@ -455,7 +457,7 @@ Connections { target: enabled ? flickableContents.Window.activeFocusItem : null enabled: flickableContents.focus && flickableContents.Window.activeFocusItem && flickableContents.Window.activeFocusItem.hasOwnProperty("text") - onTextChanged: { + function onTextChanged() { if (Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height > mainItem.Window.height) { scrollView.flickableItem.contentY += (Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height) - mainItem.Window.height } @@ -505,13 +507,13 @@ Connections { target: scrollView.flickableItem - onContentHeightChanged: { + function onContentHeightChanged() { if (openAnimation.running) { openAnimation.running = false; open(); } } - onDraggingChanged: { + function onDraggingChanged() { if (scrollView.flickableItem.dragging) { return; } @@ -535,7 +537,7 @@ } Connections { target: scrollView.verticalScrollBar - onActiveChanged: { + function onActiveChanged() { if (!scrollView.verticalScrollBar.active) { scrollView.flickableItem.movementEnded(); } diff --git a/src/controls/templates/SwipeListItem.qml b/src/controls/templates/SwipeListItem.qml --- a/src/controls/templates/SwipeListItem.qml +++ b/src/controls/templates/SwipeListItem.qml @@ -191,7 +191,7 @@ Connections { target: Kirigami.Settings - onTabletModeChanged: { + function onTabletModeChanged() { if (Kirigami.Settings.tabletMode) { if (!internal.swipeFilterItem) { var component = Qt.createComponent(Qt.resolvedUrl("../private/SwipeItemEventFilter.qml")); @@ -309,7 +309,7 @@ id: swipeFilterConnection target: internal.edgeEnabled ? internal.swipeFilterItem : null - onPeekChanged: { + function onPeekChanged() { if (!listItem.actionsVisible) { return; }