diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-04-19 11:45:08 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-19 11:10:25 +0000 |
commit | d1580898894b58c6d907cdbee8c76bf4382cd897 (patch) | |
tree | 2c3fbd113e8f0ec4c9787ef3795b2b6de3933a6a /examples/multimedia | |
parent | 55af31312a00f518b5f5aab228dcc0ede55dfeaf (diff) |
Fix QML runtime warnings
Stop using deprecated syntax.
Change-Id: Ic5f4c0a9a3737a61283eb147a9d2323f4de6771a
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/multimedia')
3 files changed, 6 insertions, 5 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml index 22ebca382..803f7fff3 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml @@ -74,7 +74,7 @@ Rectangle { Connections { id: framePaintedConnection - onFramePainted: { + function onFramePainted() { if (frameRateLoader.item) frameRateLoader.item.notify() root.videoFramePainted() @@ -84,7 +84,7 @@ Rectangle { Connections { id: errorConnection - onFatalError: { + function onFatalError() { console.log("[qmlvideo] Content.onFatalError") stop() root.error() diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml index eada51ba4..4289f79f1 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml @@ -74,9 +74,10 @@ Rectangle { Connections { target: inner - onVisibleChanged: + function onVisibleChanged() { if (performanceLoader.item) performanceLoader.item.enabled = !inner.visible + } ignoreUnknownSignals: true } @@ -229,7 +230,7 @@ Rectangle { Connections { id: videoFramePaintedConnection - onVideoFramePainted: { + function onVideoFramePainted() { if (performanceLoader.item) performanceLoader.item.videoFramePainted() } diff --git a/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml b/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml index 288fb2f08..5621450cb 100644 --- a/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml +++ b/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml @@ -81,7 +81,7 @@ Rectangle { Connections { id: videoFrameRateActiveConnections ignoreUnknownSignals: true - onActiveChanged: root.videoActive = videoFrameRateActiveConnections.target.active + function onActiveChanged() { root.videoActive = videoFrameRateActiveConnections.target.active } } states: [ |