From d1580898894b58c6d907cdbee8c76bf4382cd897 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 19 Apr 2021 11:45:08 +0200 Subject: Fix QML runtime warnings Stop using deprecated syntax. Change-Id: Ic5f4c0a9a3737a61283eb147a9d2323f4de6771a Reviewed-by: Doris Verria Reviewed-by: Lars Knoll --- examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml | 4 ++-- examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml | 5 +++-- .../performancemonitor/qml/performancemonitor/PerformanceItem.qml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'examples') 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: [ -- cgit v1.2.3