From ff44060f5e52e863df24576a574f10e66061a299 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 4 Mar 2020 08:06:42 +0200 Subject: Change more function syntax for Connection Implicitly defined onFoo properties in Connections are deprecated. Change-Id: I810de65fc69b2704904b9261663ae66afe8429fc Reviewed-by: Kari Oikarinen --- basicsuite/camera/CameraControlButton.qml | 2 +- basicsuite/camera/Controls.qml | 2 +- basicsuite/camera/FocusControl.qml | 2 +- basicsuite/ebike-ui/StatsPage.qml | 2 +- basicsuite/mediaplayer/ControlBar.qml | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'basicsuite') diff --git a/basicsuite/camera/CameraControlButton.qml b/basicsuite/camera/CameraControlButton.qml index 58cc118..e4ca4bc 100644 --- a/basicsuite/camera/CameraControlButton.qml +++ b/basicsuite/camera/CameraControlButton.qml @@ -90,7 +90,7 @@ MouseArea { Connections { target: root - onContentScaleChanged: valueTxt.font.pixelSize = Math.round(18 * root.contentScale) + function onContentScaleChanged() { valueTxt.font.pixelSize = Math.round(18 * root.contentScale) } } onTextChanged: font.pixelSize = Math.round(18 * root.contentScale) diff --git a/basicsuite/camera/Controls.qml b/basicsuite/camera/Controls.qml index 98f6183..6923ded 100644 --- a/basicsuite/camera/Controls.qml +++ b/basicsuite/camera/Controls.qml @@ -186,7 +186,7 @@ Item { Connections { target: camera - onCaptureModeChanged: { + function onCaptureModeChanged() { if (camera.captureMode === Camera.CaptureStillImage) { resControl.model = cameraUtils.supportedCaptureResolutions; } else { diff --git a/basicsuite/camera/FocusControl.qml b/basicsuite/camera/FocusControl.qml index 68c4642..9fa99ef 100644 --- a/basicsuite/camera/FocusControl.qml +++ b/basicsuite/camera/FocusControl.qml @@ -85,7 +85,7 @@ MouseArea { Connections { target: viewfinder - onContentRectChanged: { + function onContentRectChanged() { mappedRect = viewfinder.mapNormalizedRectToItem(area); } } diff --git a/basicsuite/ebike-ui/StatsPage.qml b/basicsuite/ebike-ui/StatsPage.qml index 2b3d418..9b204f0 100644 --- a/basicsuite/ebike-ui/StatsPage.qml +++ b/basicsuite/ebike-ui/StatsPage.qml @@ -65,7 +65,7 @@ Page { // On new trip data (save clicked), switch index to new trip Connections { target: tripdata - onTripDataSaved: tripView.setCurrentIndex(index) + function onTripDataSaved(index) { tripView.setCurrentIndex(index) } } RoundButton { diff --git a/basicsuite/mediaplayer/ControlBar.qml b/basicsuite/mediaplayer/ControlBar.qml index cdf27f2..da422b3 100644 --- a/basicsuite/mediaplayer/ControlBar.qml +++ b/basicsuite/mediaplayer/ControlBar.qml @@ -208,22 +208,22 @@ Rectangle { Connections { target: mediaPlayer - onVolumeChanged: volumeControl.volume = mediaPlayer.volume + function onVolumeChanged() { volumeControl.volume = mediaPlayer.volume } } } Connections { target: mediaPlayer - onPositionChanged: { + function onPositionChanged() { if (!seekControl.pressed) seekControl.position = mediaPlayer.position; } - onStatusChanged: { + function onStatusChanged() { if ((mediaPlayer.status == MediaPlayer.Loaded) || (mediaPlayer.status == MediaPlayer.Buffered) || mediaPlayer.status === MediaPlayer.Buffering || mediaPlayer.status === MediaPlayer.EndOfMedia) playbackControl.isPlaybackEnabled = true; else playbackControl.isPlaybackEnabled = false; } - onPlaybackStateChanged: { + function onPlaybackStateChanged() { if (mediaPlayer.playbackState === MediaPlayer.PlayingState) { playbackControl.isPlaying = true; applicationWindow.resetTimer(); @@ -233,7 +233,7 @@ Rectangle { } } - onSeekableChanged: { + function onSeekableChanged() { seekControl.seekable = mediaPlayer.seekable; } } -- cgit v1.2.3