summaryrefslogtreecommitdiffstats
path: root/basicsuite
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-03-04 08:06:42 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2020-03-04 08:23:58 +0000
commitff44060f5e52e863df24576a574f10e66061a299 (patch)
tree5386b72a5e64655b9cc23cfdcf868989cd8797ce /basicsuite
parent5e2ae18ef11b97187dac110fe1ac7a636974fe85 (diff)
Change more function syntax for Connection
Implicitly defined onFoo properties in Connections are deprecated. Change-Id: I810de65fc69b2704904b9261663ae66afe8429fc Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Diffstat (limited to 'basicsuite')
-rw-r--r--basicsuite/camera/CameraControlButton.qml2
-rw-r--r--basicsuite/camera/Controls.qml2
-rw-r--r--basicsuite/camera/FocusControl.qml2
-rw-r--r--basicsuite/ebike-ui/StatsPage.qml2
-rw-r--r--basicsuite/mediaplayer/ControlBar.qml10
5 files changed, 9 insertions, 9 deletions
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;
}
}