aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2023-12-27 15:41:08 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-12-29 18:33:16 +0000
commit3f4959a9b496e1508b0b39d2548b5369cd591fe3 (patch)
tree58555bdc06c0ef6c622bca37b74d329ad4d59344
parent58dda4877b61ecc778a17e9fa46959e8427d1eb9 (diff)
Fix invalid isStaticShape value for triangle mesh
It should return true. Caused accidentally by f43d8bf1aed47da1ae13d73d59e439ce6ef53348 Pick-to: 6.6 6.5 Change-Id: If5a6afba470026ef522dbcaaf5c578d62edbdbdf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 7708e407de68edb8c9a1b73544b5da8fcbc91589) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick3dphysics/qconvexmeshshape.cpp5
-rw-r--r--src/quick3dphysics/qconvexmeshshape_p.h1
-rw-r--r--src/quick3dphysics/qmeshshape_p.h1
-rw-r--r--src/quick3dphysics/qtrianglemeshshape.cpp5
-rw-r--r--src/quick3dphysics/qtrianglemeshshape_p.h1
5 files changed, 12 insertions, 1 deletions
diff --git a/src/quick3dphysics/qconvexmeshshape.cpp b/src/quick3dphysics/qconvexmeshshape.cpp
index d9a13de..f2b06b0 100644
--- a/src/quick3dphysics/qconvexmeshshape.cpp
+++ b/src/quick3dphysics/qconvexmeshshape.cpp
@@ -51,4 +51,9 @@ QMeshShape::MeshType QConvexMeshShape::shapeType() const
return QMeshShape::MeshType::CONVEX;
}
+bool QConvexMeshShape::isStaticShape() const
+{
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/quick3dphysics/qconvexmeshshape_p.h b/src/quick3dphysics/qconvexmeshshape_p.h
index d48b915..9a6c79a 100644
--- a/src/quick3dphysics/qconvexmeshshape_p.h
+++ b/src/quick3dphysics/qconvexmeshshape_p.h
@@ -24,6 +24,7 @@ class Q_QUICK3DPHYSICS_EXPORT QConvexMeshShape : public QMeshShape
Q_OBJECT
QML_NAMED_ELEMENT(ConvexMeshShape)
virtual QMeshShape::MeshType shapeType() const override;
+ virtual bool isStaticShape() const override;
};
QT_END_NAMESPACE
diff --git a/src/quick3dphysics/qmeshshape_p.h b/src/quick3dphysics/qmeshshape_p.h
index b90865e..2c273c2 100644
--- a/src/quick3dphysics/qmeshshape_p.h
+++ b/src/quick3dphysics/qmeshshape_p.h
@@ -54,7 +54,6 @@ public:
Q_REVISION(6, 5) void setSource(const QUrl &newSource);
Q_REVISION(6, 7) QQuick3DGeometry *geometry() const;
Q_REVISION(6, 7) void setGeometry(QQuick3DGeometry *newGeometry);
- bool isStaticShape() const override { return false; }
signals:
Q_REVISION(6, 5) void sourceChanged();
diff --git a/src/quick3dphysics/qtrianglemeshshape.cpp b/src/quick3dphysics/qtrianglemeshshape.cpp
index 2c28581..75a06ee 100644
--- a/src/quick3dphysics/qtrianglemeshshape.cpp
+++ b/src/quick3dphysics/qtrianglemeshshape.cpp
@@ -49,4 +49,9 @@ QMeshShape::MeshType QTriangleMeshShape::shapeType() const
return QMeshShape::MeshType::TRIANGLE;
}
+bool QTriangleMeshShape::isStaticShape() const
+{
+ return true;
+}
+
QT_END_NAMESPACE
diff --git a/src/quick3dphysics/qtrianglemeshshape_p.h b/src/quick3dphysics/qtrianglemeshshape_p.h
index 1fac3f2..ca7fe1c 100644
--- a/src/quick3dphysics/qtrianglemeshshape_p.h
+++ b/src/quick3dphysics/qtrianglemeshshape_p.h
@@ -24,6 +24,7 @@ class Q_QUICK3DPHYSICS_EXPORT QTriangleMeshShape : public QMeshShape
Q_OBJECT
QML_NAMED_ELEMENT(TriangleMeshShape)
virtual QMeshShape::MeshType shapeType() const override;
+ virtual bool isStaticShape() const override;
};
QT_END_NAMESPACE