summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/geometry/qgeometryfactory_p.h4
-rw-r--r--src/render/geometry/qmesh.cpp2
-rw-r--r--src/render/geometry/qmesh_p.h2
-rw-r--r--tests/auto/render/meshfunctors/tst_meshfunctors.cpp6
4 files changed, 8 insertions, 6 deletions
diff --git a/src/core/geometry/qgeometryfactory_p.h b/src/core/geometry/qgeometryfactory_p.h
index 47f3a5281..97114d658 100644
--- a/src/core/geometry/qgeometryfactory_p.h
+++ b/src/core/geometry/qgeometryfactory_p.h
@@ -66,7 +66,9 @@ class Q_3DCORESHARED_EXPORT QGeometryFactory : public QAbstractFunctor
public:
virtual ~QGeometryFactory();
virtual QGeometry *operator()() = 0;
- virtual bool operator ==(const QGeometryFactory &other) const = 0;
+ virtual bool equals(const QGeometryFactory &other) const = 0;
+ friend bool operator==(const QGeometryFactory &lhs, const QGeometryFactory &rhs)
+ { return lhs.equals(rhs); }
};
typedef QSharedPointer<QGeometryFactory> QGeometryFactoryPtr;
diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp
index 1180380b0..9bcad868d 100644
--- a/src/render/geometry/qmesh.cpp
+++ b/src/render/geometry/qmesh.cpp
@@ -388,7 +388,7 @@ Qt3DCore::QGeometry *MeshLoaderFunctor::operator()()
/*!
* \internal
*/
-bool MeshLoaderFunctor::operator ==(const QGeometryFactory &other) const
+bool MeshLoaderFunctor::equals(const QGeometryFactory &other) const
{
const MeshLoaderFunctor *otherFunctor = functor_cast<MeshLoaderFunctor>(&other);
if (otherFunctor != nullptr)
diff --git a/src/render/geometry/qmesh_p.h b/src/render/geometry/qmesh_p.h
index 9d34a6ae6..e38f5779b 100644
--- a/src/render/geometry/qmesh_p.h
+++ b/src/render/geometry/qmesh_p.h
@@ -119,7 +119,7 @@ public :
QMesh::Status status() const { return m_status; }
Qt3DCore::QGeometry *operator()() override;
- bool operator ==(const Qt3DCore::QGeometryFactory &other) const override;
+ bool equals(const Qt3DCore::QGeometryFactory &other) const override;
QT3D_FUNCTOR(MeshLoaderFunctor)
private:
diff --git a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
index fc22b17f7..bf8d9f2af 100644
--- a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
+++ b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
@@ -47,7 +47,7 @@ public:
return nullptr;
}
- bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
+ bool equals(const Qt3DCore::QGeometryFactory &other) const override
{
return Qt3DCore::functor_cast<MeshFunctorA>(&other);
}
@@ -69,7 +69,7 @@ public:
return nullptr;
}
- bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
+ bool equals(const Qt3DCore::QGeometryFactory &other) const override
{
return Qt3DCore::functor_cast<MeshFunctorB>(&other);
}
@@ -86,7 +86,7 @@ public:
~MeshFunctorASub()
{}
- bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
+ bool equals(const Qt3DCore::QGeometryFactory &other) const override
{
return Qt3DCore::functor_cast<MeshFunctorASub>(&other);
}