diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2021-12-01 08:39:48 +0200 |
---|---|---|
committer | Kaj Grönholm <kaj.gronholm@qt.io> | 2021-12-03 05:19:42 +0000 |
commit | 4a5603b15c1470a23e739c713e8df61b9388f6f5 (patch) | |
tree | cdb164562dbe18b680e576e3210d6a6f90b9a94e /share | |
parent | 40c2d9a06bfa3adb4670fdc2e5bef7659d83bd04 (diff) |
Adjust to model bounds calculation API change
Model bounds API changed with 25b757b7b0a286a392b3 so switch to new
API with version checks.
Task-number: QDS-5657
Change-Id: I6d880f179fc277f94ea9ac610ae682e9afbefe39
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp | 4 | ||||
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp index 67d134f6b3..8c63262514 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/generalhelper.cpp @@ -215,7 +215,11 @@ QVector4D GeneralHelper::focusNodesToCamera(QQuick3DCamera *camera, float defaul bounds = geometry->bounds(); } else { auto bufferManager = context->bufferManager(); +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) bounds = renderModel->getModelBounds(bufferManager); +#else + bounds = bufferManager->getModelBounds(renderModel); +#endif } center = renderModel->globalTransform.map(bounds.center()); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp index 9e2bd181db..4a67141f24 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/editor3d/selectionboxgeometry.cpp @@ -306,7 +306,11 @@ void SelectionBoxGeometry::getBounds( #endif if (!context.isNull()) { auto bufferManager = context->bufferManager(); +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) QSSGBounds3 bounds = renderModel->getModelBounds(bufferManager); +#else + QSSGBounds3 bounds = bufferManager->getModelBounds(renderModel); +#endif QVector3D center = bounds.center(); QVector3D extents = bounds.extents(); QVector3D localMin = center - extents; |