summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2023-05-05 16:05:30 +0200
committerKai Köhne <kai.koehne@qt.io>2023-06-07 11:44:50 +0200
commit5551d97a06b08f8f1e7b75bc93fbcc14ff734881 (patch)
tree4e24d662393c256d699b42f6f63f0c19357745c4
parent7cebe39efb3057b7932a2d90a56ecc6a971f66f7 (diff)
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. Pick-to: 6.5 6.6 Change-Id: I51f8e912c41c96fdd10c9fe633ec2be3e52a8ecc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--examples/qt3d/pbr-materials/BasicCamera.qml2
1 files changed, 1 insertions, 1 deletions
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 )