From 7c971e0e7791ab38d7d3d8ebc25468c44cbe49c5 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 12 Oct 2015 20:45:19 +0100 Subject: Move Qt3DCore into Qt3DCore namespace Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire --- tests/auto/render/qgeometry/tst_qgeometry.cpp | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'tests/auto/render/qgeometry') diff --git a/tests/auto/render/qgeometry/tst_qgeometry.cpp b/tests/auto/render/qgeometry/tst_qgeometry.cpp index 00c44d953..692cd6f16 100644 --- a/tests/auto/render/qgeometry/tst_qgeometry.cpp +++ b/tests/auto/render/qgeometry/tst_qgeometry.cpp @@ -47,29 +47,29 @@ class TestArbiter; -class TestPostman : public Qt3D::QAbstractPostman +class TestPostman : public Qt3DCore::QAbstractPostman { public: TestPostman(TestArbiter *arbiter) : m_arbiter(arbiter) {} - void sceneChangeEvent(const Qt3D::QSceneChangePtr &) Q_DECL_FINAL + void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &) Q_DECL_FINAL {} - void setScene(Qt3D::QScene *) Q_DECL_FINAL + void setScene(Qt3DCore::QScene *) Q_DECL_FINAL {} - void notifyBackend(const Qt3D::QSceneChangePtr &e) Q_DECL_FINAL; + void notifyBackend(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL; private: TestArbiter *m_arbiter; }; -class TestArbiter : public Qt3D::QAbstractArbiter +class TestArbiter : public Qt3DCore::QAbstractArbiter { public: - TestArbiter(Qt3D::QNode *node) + TestArbiter(Qt3DCore::QNode *node) : m_postman(new TestPostman(this)) , m_node(node) { @@ -78,51 +78,51 @@ public: ~TestArbiter() { - Qt3D::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR); + Qt3DCore::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR); } - void sceneChangeEvent(const Qt3D::QSceneChangePtr &e) Q_DECL_FINAL + void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL { events.push_back(e); } - void sceneChangeEventWithLock(const Qt3D::QSceneChangePtr &e) Q_DECL_FINAL + void sceneChangeEventWithLock(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL { events.push_back(e); } - void sceneChangeEventWithLock(const Qt3D::QSceneChangeList &e) Q_DECL_FINAL + void sceneChangeEventWithLock(const Qt3DCore::QSceneChangeList &e) Q_DECL_FINAL { - events += QVector::fromStdVector(e); + events += QVector::fromStdVector(e); } - Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL + Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL { return m_postman; } - QVector events; + QVector events; private: TestPostman *m_postman; - Qt3D::QNode *m_node; + Qt3DCore::QNode *m_node; - void assignArbiter(Qt3D::QNode *node) + void assignArbiter(Qt3DCore::QNode *node) { - Qt3D::QNodePrivate::get(node)->setArbiter(this); - Q_FOREACH (Qt3D::QNode *n, node->childrenNodes()) + Qt3DCore::QNodePrivate::get(node)->setArbiter(this); + Q_FOREACH (Qt3DCore::QNode *n, node->childrenNodes()) assignArbiter(n); } }; -void TestPostman::notifyBackend(const Qt3D::QSceneChangePtr &e) +void TestPostman::notifyBackend(const Qt3DCore::QSceneChangePtr &e) { m_arbiter->sceneChangeEventWithLock(e); } // We need to call QNode::clone which is protected // So we sublcass QNode instead of QObject -class tst_QGeometry: public Qt3D::QNode +class tst_QGeometry: public Qt3DCore::QNode { Q_OBJECT public: @@ -203,10 +203,10 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 1); - Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast(); + Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast(); QCOMPARE(change->propertyName(), "attribute"); - QCOMPARE(change->value().value(), attr.id()); - QCOMPARE(change->type(), Qt3D::NodeAdded); + QCOMPARE(change->value().value(), attr.id()); + QCOMPARE(change->type(), Qt3DCore::NodeAdded); arbiter.events.clear(); @@ -223,10 +223,10 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 1); - change = arbiter.events.first().staticCast(); + change = arbiter.events.first().staticCast(); QCOMPARE(change->propertyName(), "attribute"); - QCOMPARE(change->value().value(), attr.id()); - QCOMPARE(change->type(), Qt3D::NodeRemoved); + QCOMPARE(change->value().value(), attr.id()); + QCOMPARE(change->type(), Qt3DCore::NodeRemoved); arbiter.events.clear(); @@ -236,16 +236,16 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 1); - change = arbiter.events.first().staticCast(); + change = arbiter.events.first().staticCast(); QCOMPARE(change->propertyName(), "verticesPerPatch"); QCOMPARE(change->value().toInt(), 2); - QCOMPARE(change->type(), Qt3D::NodeUpdated); + QCOMPARE(change->type(), Qt3DCore::NodeUpdated); arbiter.events.clear(); } protected: - Qt3D::QNode *doClone() const Q_DECL_OVERRIDE + Qt3DCore::QNode *doClone() const Q_DECL_OVERRIDE { return Q_NULLPTR; } -- cgit v1.2.3