From 555dbc0ae0f28b5062228d09217e20153844303e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 5 May 2023 16:05:30 +0200 Subject: pbr-materials: Fix runtime warning Fixes qt.qml.context: qrc:/BasicCamera.qml:14:5 Parameter "aspectRatio" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. Change-Id: I51f8e912c41c96fdd10c9fe633ec2be3e52a8ecc Reviewed-by: Fabian Kosmale (cherry picked from commit 5551d97a06b08f8f1e7b75bc93fbcc14ff734881) Reviewed-by: Qt Cherry-pick Bot --- examples/qt3d/pbr-materials/BasicCamera.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qt3d/pbr-materials/BasicCamera.qml b/examples/qt3d/pbr-materials/BasicCamera.qml index eab086b32..77736f953 100644 --- a/examples/qt3d/pbr-materials/BasicCamera.qml +++ b/examples/qt3d/pbr-materials/BasicCamera.qml @@ -11,7 +11,7 @@ Camera { projectionType: CameraLens.PerspectiveProjection fieldOfView: 22.5 aspectRatio: _window.width / _window.height - onAspectRatioChanged: console.log( "aspectRatio = " + aspectRatio ) + onAspectRatioChanged: function(aspectRatio) { console.log( "aspectRatio = " + aspectRatio ) } nearPlane: 0.01 farPlane: 1000.0 viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) -- cgit v1.2.3