summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp42
-rw-r--r--tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp42
-rw-r--r--tests/auto/core/cloning/tst_cloning.cpp24
-rw-r--r--tests/auto/core/handle/tst_handle.cpp4
-rw-r--r--tests/auto/core/handlemanager/tst_handlemanager.cpp20
-rw-r--r--tests/auto/core/listresourcesmanager/tst_listresourcesmanager.cpp42
-rw-r--r--tests/auto/core/nodes/tst_nodes.cpp170
-rw-r--r--tests/auto/core/qaspectengine/tst_qaspectengine.cpp4
-rw-r--r--tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp2
-rw-r--r--tests/auto/core/qboundedcircularbuffer/tst_qboundedcircularbuffer.cpp2
-rw-r--r--tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp246
-rw-r--r--tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp2
-rw-r--r--tests/auto/core/qentity/tst_qentity.cpp46
-rw-r--r--tests/auto/core/qframeallocator/tst_qframeallocator.cpp54
-rw-r--r--tests/auto/core/qray3d/tst_qray3d.cpp64
-rw-r--r--tests/auto/core/qscene/tst_qscene.cpp144
-rw-r--r--tests/auto/core/qservicelocator/tst_qservicelocator.cpp2
-rw-r--r--tests/auto/core/threadpooler/tst_threadpooler.cpp18
-rw-r--r--tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp2
-rw-r--r--tests/auto/render/attribute/tst_attribute.cpp36
-rw-r--r--tests/auto/render/buffer/tst_buffer.cpp8
-rw-r--r--tests/auto/render/entity/tst_entity.cpp8
-rw-r--r--tests/auto/render/geometry/tst_geometry.cpp8
-rw-r--r--tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp24
-rw-r--r--tests/auto/render/material/tst_material.cpp2
-rw-r--r--tests/auto/render/qattribute/tst_qattribute.cpp98
-rw-r--r--tests/auto/render/qbuffer/tst_qbuffer.cpp48
-rw-r--r--tests/auto/render/qgeometry/tst_qgeometry.cpp56
-rw-r--r--tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp90
-rw-r--r--tests/auto/render/qmaterial/tst_qmaterial.cpp108
-rw-r--r--tests/auto/render/raycasting/tst_raycasting.cpp2
-rw-r--r--tests/auto/render/renderpass/tst_renderpass.cpp2
-rw-r--r--tests/auto/render/renderviews/tst_renderviews.cpp2
-rw-r--r--tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp2
-rw-r--r--tests/benchmarks/core/qframeallocator/tst_bench_qframeallocator.cpp2
-rw-r--r--tests/benchmarks/core/qresourcesmanager/arraypolicy/tst_bench_arraypolicy.cpp16
-rw-r--r--tests/benchmarks/core/qresourcesmanager/qresourcesmanager/tst_bench_qresourcesmanager.cpp18
37 files changed, 730 insertions, 730 deletions
diff --git a/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp b/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
index cc2889eb6..5515fa6ad 100644
--- a/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
+++ b/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
@@ -69,16 +69,16 @@ public:
QAtomicInt m_value;
};
-typedef Qt3D::QHandle<tst_ArrayResource> tHandle;
-typedef Qt3D::QHandle<tst_ArrayResource, 4> tHandle4;
-typedef Qt3D::QHandle<tst_ArrayResource, 8> tHandle8;
-typedef Qt3D::QHandle<tst_ArrayResource, 16> tHandle16;
+typedef Qt3DCore::QHandle<tst_ArrayResource> tHandle;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 4> tHandle4;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 8> tHandle8;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 16> tHandle16;
void tst_DynamicArrayPolicy::createResourcesManager()
{
- Qt3D::QResourceManager<tst_ArrayResource, int, 16> manager16;
- Qt3D::QResourceManager<tst_ArrayResource, int, 4> manager4;
- Qt3D::QResourceManager<tst_ArrayResource, int, 8> manager8;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 16> manager16;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 4> manager4;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 8> manager8;
QVERIFY(manager16.maxResourcesEntries() == 65535);
QVERIFY(manager8.maxResourcesEntries() == 255);
QVERIFY(manager4.maxResourcesEntries() == 15);
@@ -90,7 +90,7 @@ void tst_DynamicArrayPolicy::createResourcesManager()
*/
void tst_DynamicArrayPolicy::acquireResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 4> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 4> manager;
QList<tHandle4> handles;
@@ -110,7 +110,7 @@ void tst_DynamicArrayPolicy::acquireResources()
void tst_DynamicArrayPolicy::getResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, int, 8> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 8> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle8> handles;
@@ -141,7 +141,7 @@ void tst_DynamicArrayPolicy::getResources()
*/
void tst_DynamicArrayPolicy::registerResourcesResize()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16> manager;
QList<tHandle16> handles;
for (uint i = 0; i < 2; i++) {
@@ -169,7 +169,7 @@ void tst_DynamicArrayPolicy::registerResourcesResize()
*/
void tst_DynamicArrayPolicy::removeResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, int> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle> handles;
@@ -193,7 +193,7 @@ void tst_DynamicArrayPolicy::removeResource()
*/
void tst_DynamicArrayPolicy::resetResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
@@ -220,7 +220,7 @@ void tst_DynamicArrayPolicy::resetResource()
void tst_DynamicArrayPolicy::lookupResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
@@ -245,7 +245,7 @@ void tst_DynamicArrayPolicy::lookupResource()
void tst_DynamicArrayPolicy::releaseResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint> manager;
QList<tst_ArrayResource *> resources;
for (int i = 0; i < 5; i++) {
@@ -267,11 +267,11 @@ class tst_Thread : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ArrayResource,
+ typedef Qt3DCore::QResourceManager<tst_ArrayResource,
int,
16,
- Qt3D::ArrayAllocatingPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ArrayAllocatingPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread()
: QThread()
@@ -338,11 +338,11 @@ class tst_Thread2 : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ArrayResource,
+ typedef Qt3DCore::QResourceManager<tst_ArrayResource,
int,
16,
- Qt3D::ArrayAllocatingPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ArrayAllocatingPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread2(int releaseAbove = 7)
: QThread()
@@ -414,7 +414,7 @@ void tst_DynamicArrayPolicy::heavyDutyMultiThreadedAccessRelease()
void tst_DynamicArrayPolicy::maximumNumberOfResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
diff --git a/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp b/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
index c3fa5aea5..d56196d00 100644
--- a/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
+++ b/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
@@ -69,16 +69,16 @@ public:
QAtomicInt m_value;
};
-typedef Qt3D::QHandle<tst_ArrayResource> tHandle;
-typedef Qt3D::QHandle<tst_ArrayResource, 4> tHandle4;
-typedef Qt3D::QHandle<tst_ArrayResource, 8> tHandle8;
-typedef Qt3D::QHandle<tst_ArrayResource, 16> tHandle16;
+typedef Qt3DCore::QHandle<tst_ArrayResource> tHandle;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 4> tHandle4;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 8> tHandle8;
+typedef Qt3DCore::QHandle<tst_ArrayResource, 16> tHandle16;
void tst_PreallocatedArrayPolicy::createResourcesManager()
{
- Qt3D::QResourceManager<tst_ArrayResource, int, 16, Qt3D::ArrayPreallocationPolicy> manager16;
- Qt3D::QResourceManager<tst_ArrayResource, int, 4, Qt3D::ArrayPreallocationPolicy> manager4;
- Qt3D::QResourceManager<tst_ArrayResource, int, 8, Qt3D::ArrayPreallocationPolicy> manager8;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 16, Qt3DCore::ArrayPreallocationPolicy> manager16;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 4, Qt3DCore::ArrayPreallocationPolicy> manager4;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 8, Qt3DCore::ArrayPreallocationPolicy> manager8;
QVERIFY(manager16.maxResourcesEntries() == 65535);
QVERIFY(manager8.maxResourcesEntries() == 255);
QVERIFY(manager4.maxResourcesEntries() == 15);
@@ -90,7 +90,7 @@ void tst_PreallocatedArrayPolicy::createResourcesManager()
*/
void tst_PreallocatedArrayPolicy::acquireResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 4, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 4, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tHandle4> handles;
@@ -110,7 +110,7 @@ void tst_PreallocatedArrayPolicy::acquireResources()
void tst_PreallocatedArrayPolicy::getResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, int, 8, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 8, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle8> handles;
@@ -141,7 +141,7 @@ void tst_PreallocatedArrayPolicy::getResources()
*/
void tst_PreallocatedArrayPolicy::registerResourcesResize()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tHandle16> handles;
for (uint i = 0; i < 2; i++) {
@@ -169,7 +169,7 @@ void tst_PreallocatedArrayPolicy::registerResourcesResize()
*/
void tst_PreallocatedArrayPolicy::removeResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, int, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, int, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle> handles;
@@ -193,7 +193,7 @@ void tst_PreallocatedArrayPolicy::removeResource()
*/
void tst_PreallocatedArrayPolicy::resetResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
@@ -220,7 +220,7 @@ void tst_PreallocatedArrayPolicy::resetResource()
void tst_PreallocatedArrayPolicy::lookupResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
@@ -245,7 +245,7 @@ void tst_PreallocatedArrayPolicy::lookupResource()
void tst_PreallocatedArrayPolicy::releaseResource()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
for (int i = 0; i < 5; i++) {
@@ -267,11 +267,11 @@ class tst_Thread : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ArrayResource,
+ typedef Qt3DCore::QResourceManager<tst_ArrayResource,
int,
16,
- Qt3D::ArrayPreallocationPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ArrayPreallocationPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread()
: QThread()
@@ -339,11 +339,11 @@ class tst_Thread2 : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ArrayResource,
+ typedef Qt3DCore::QResourceManager<tst_ArrayResource,
int,
16,
- Qt3D::ArrayPreallocationPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ArrayPreallocationPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread2(int releaseAbove = 7)
: QThread()
@@ -415,7 +415,7 @@ void tst_PreallocatedArrayPolicy::heavyDutyMultiThreadedAccessRelease()
void tst_PreallocatedArrayPolicy::maximumNumberOfResources()
{
- Qt3D::QResourceManager<tst_ArrayResource, uint, 16, Qt3D::ArrayPreallocationPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ArrayResource, uint, 16, Qt3DCore::ArrayPreallocationPolicy> manager;
QList<tst_ArrayResource *> resources;
QList<tHandle16> handles;
diff --git a/tests/auto/core/cloning/tst_cloning.cpp b/tests/auto/core/cloning/tst_cloning.cpp
index 1ea911698..1ddada245 100644
--- a/tests/auto/core/cloning/tst_cloning.cpp
+++ b/tests/auto/core/cloning/tst_cloning.cpp
@@ -51,11 +51,11 @@ private slots:
void checkEntityCloning();
};
-class MyQNode : public Qt3D::QNode
+class MyQNode : public Qt3DCore::QNode
{
Q_OBJECT
public:
- explicit MyQNode(Qt3D::QNode *parent = 0) : QNode(parent)
+ explicit MyQNode(Qt3DCore::QNode *parent = 0) : QNode(parent)
{}
~MyQNode()
@@ -75,19 +75,19 @@ public:
}
protected:
- void copy(const Qt3D::QNode *ref) Q_DECL_OVERRIDE
+ void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE
{
- Qt3D::QNode::copy(ref);
+ Qt3DCore::QNode::copy(ref);
const MyQNode *refNode = qobject_cast<const MyQNode *>(ref);
setCustomProperty(refNode->customProperty());
}
};
-class MyQComponent : public Qt3D::QComponent
+class MyQComponent : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit MyQComponent(Qt3D::QNode *parent = 0) : QComponent(parent)
+ explicit MyQComponent(Qt3DCore::QNode *parent = 0) : QComponent(parent)
{}
~MyQComponent()
@@ -101,11 +101,11 @@ public:
void tst_Cloning::checkEntityCloning()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene();
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene();
MyQNode *root = new MyQNode();
- Qt3D::QNodePrivate::get(root)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene);
- Qt3D::QEntity *entity = new Qt3D::QEntity(root);
+ Qt3DCore::QEntity *entity = new Qt3DCore::QEntity(root);
// WHEN
MyQComponent *comp1 = new MyQComponent();
@@ -133,16 +133,16 @@ void tst_Cloning::checkEntityCloning()
QCOMPARE(cloneRoot->id(), root->id());
QVERIFY(cloneRoot->customProperty() == root->customProperty());
- Qt3D::QEntity *cloneEntity = qobject_cast<Qt3D::QEntity *>(cloneRoot->children().first());
+ Qt3DCore::QEntity *cloneEntity = qobject_cast<Qt3DCore::QEntity *>(cloneRoot->children().first());
QVERIFY(cloneEntity != Q_NULLPTR);
QCOMPARE(cloneEntity->id(), entity->id());
QCOMPARE(cloneEntity->children().count(), 4);
QCOMPARE(cloneEntity->components().count(), 3);
- QList<Qt3D::QNodeId> ids = QList<Qt3D::QNodeId>() << comp1->id() << comp2->id() << comp3->id() << childNode->id();
+ QList<Qt3DCore::QNodeId> ids = QList<Qt3DCore::QNodeId>() << comp1->id() << comp2->id() << comp3->id() << childNode->id();
Q_FOREACH (QObject *c, cloneEntity->children()) {
- Qt3D::QNode *n = qobject_cast<Qt3D::QNode *>(c);
+ Qt3DCore::QNode *n = qobject_cast<Qt3DCore::QNode *>(c);
QVERIFY(ids.contains(n->id()));
ids.removeAll(n->id());
}
diff --git a/tests/auto/core/handle/tst_handle.cpp b/tests/auto/core/handle/tst_handle.cpp
index 7f2c01903..d993056a1 100644
--- a/tests/auto/core/handle/tst_handle.cpp
+++ b/tests/auto/core/handle/tst_handle.cpp
@@ -69,8 +69,8 @@ public:
int m_value;
};
-typedef Qt3D::QHandle<SimpleResource> Handle;
-typedef Qt3D::QHandle<SimpleResource, 22> BigHandle;
+typedef Qt3DCore::QHandle<SimpleResource> Handle;
+typedef Qt3DCore::QHandle<SimpleResource, 22> BigHandle;
void tst_Handle::defaultConstruction()
{
diff --git a/tests/auto/core/handlemanager/tst_handlemanager.cpp b/tests/auto/core/handlemanager/tst_handlemanager.cpp
index bdbc6252a..66911f2c9 100644
--- a/tests/auto/core/handlemanager/tst_handlemanager.cpp
+++ b/tests/auto/core/handlemanager/tst_handlemanager.cpp
@@ -67,17 +67,17 @@ public:
int m_value;
};
-typedef Qt3D::QHandle<SimpleResource> Handle;
+typedef Qt3DCore::QHandle<SimpleResource> Handle;
void tst_HandleManager::construction()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QVERIFY(manager.activeEntries() == 0);
}
void tst_HandleManager::correctPointer()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
SimpleResource *p1 = (SimpleResource *)0xdeadbeef;
const Handle h = manager.acquire(p1);
@@ -89,7 +89,7 @@ void tst_HandleManager::correctPointer()
void tst_HandleManager::correctPointers()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
SimpleResource *p[3];
p[0] = (SimpleResource *)0xdeadbeef;
p[1] = (SimpleResource *)0x11111111;
@@ -109,7 +109,7 @@ void tst_HandleManager::correctPointers()
void tst_HandleManager::correctConstPointer()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QSharedPointer<SimpleResource> p1(new SimpleResource);
const Handle h = manager.acquire(p1.data());
@@ -121,7 +121,7 @@ void tst_HandleManager::correctConstPointer()
void tst_HandleManager::nullForRemovedEntry()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QSharedPointer<SimpleResource> p1(new SimpleResource);
const Handle h = manager.acquire(p1.data());
manager.release(h);
@@ -134,7 +134,7 @@ void tst_HandleManager::nullForRemovedEntry()
void tst_HandleManager::validHandleForReplacementEntry()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QSharedPointer<SimpleResource> p1(new SimpleResource);
const Handle h = manager.acquire(p1.data());
QVERIFY(manager.activeEntries() == 1);
@@ -155,7 +155,7 @@ void tst_HandleManager::validHandleForReplacementEntry()
void tst_HandleManager::updateChangesValue()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QSharedPointer<SimpleResource> p1(new SimpleResource);
const Handle h = manager.acquire(p1.data());
@@ -171,7 +171,7 @@ void tst_HandleManager::updateChangesValue()
void tst_HandleManager::resetRemovesAllEntries()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
for (int i = 0; i < 100; ++i) {
SimpleResource *p = (SimpleResource *) 0xdead0000 + i;
const Handle h = manager.acquire(p);
@@ -190,7 +190,7 @@ void tst_HandleManager::resetRemovesAllEntries()
void tst_HandleManager::maximumEntries()
{
- Qt3D::QHandleManager<SimpleResource> manager;
+ Qt3DCore::QHandleManager<SimpleResource> manager;
QCOMPARE(Handle::maxIndex(), (uint)((1 << 16) - 1));
diff --git a/tests/auto/core/listresourcesmanager/tst_listresourcesmanager.cpp b/tests/auto/core/listresourcesmanager/tst_listresourcesmanager.cpp
index 3f18fee4b..a3dbb3ea1 100644
--- a/tests/auto/core/listresourcesmanager/tst_listresourcesmanager.cpp
+++ b/tests/auto/core/listresourcesmanager/tst_listresourcesmanager.cpp
@@ -69,16 +69,16 @@ public:
QAtomicInt m_value;
};
-typedef Qt3D::QHandle<tst_ListResource> tHandle;
-typedef Qt3D::QHandle<tst_ListResource, 4> tHandle4;
-typedef Qt3D::QHandle<tst_ListResource, 8> tHandle8;
-typedef Qt3D::QHandle<tst_ListResource, 16> tHandle16;
+typedef Qt3DCore::QHandle<tst_ListResource> tHandle;
+typedef Qt3DCore::QHandle<tst_ListResource, 4> tHandle4;
+typedef Qt3DCore::QHandle<tst_ListResource, 8> tHandle8;
+typedef Qt3DCore::QHandle<tst_ListResource, 16> tHandle16;
void tst_ListResourcesManager::createResourcesManager()
{
- Qt3D::QResourceManager<tst_ListResource, int, 16, Qt3D::ListAllocatingPolicy> manager16;
- Qt3D::QResourceManager<tst_ListResource, int, 4, Qt3D::ListAllocatingPolicy> manager4;
- Qt3D::QResourceManager<tst_ListResource, int, 8, Qt3D::ListAllocatingPolicy> manager8;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 16, Qt3DCore::ListAllocatingPolicy> manager16;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 4, Qt3DCore::ListAllocatingPolicy> manager4;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 8, Qt3DCore::ListAllocatingPolicy> manager8;
QVERIFY(manager16.maxResourcesEntries() == 65535);
QVERIFY(manager8.maxResourcesEntries() == 255);
@@ -91,7 +91,7 @@ void tst_ListResourcesManager::createResourcesManager()
*/
void tst_ListResourcesManager::acquireResources()
{
- Qt3D::QResourceManager<tst_ListResource, int, 4, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 4, Qt3DCore::ListAllocatingPolicy> manager;
QList<tHandle4> handles;
@@ -111,7 +111,7 @@ void tst_ListResourcesManager::acquireResources()
void tst_ListResourcesManager::getResources()
{
- Qt3D::QResourceManager<tst_ListResource, int, 8, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 8, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
QList<tHandle8> handles;
@@ -142,7 +142,7 @@ void tst_ListResourcesManager::getResources()
*/
void tst_ListResourcesManager::registerResourcesResize()
{
- Qt3D::QResourceManager<tst_ListResource, int, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tHandle16> handles;
for (uint i = 0; i < 2; i++) {
@@ -170,7 +170,7 @@ void tst_ListResourcesManager::registerResourcesResize()
*/
void tst_ListResourcesManager::removeResource()
{
- Qt3D::QResourceManager<tst_ListResource, int, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
QList<tHandle> handles;
@@ -194,7 +194,7 @@ void tst_ListResourcesManager::removeResource()
*/
void tst_ListResourcesManager::resetResource()
{
- Qt3D::QResourceManager<tst_ListResource, int, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, int, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
QList<tHandle16> handles;
@@ -221,7 +221,7 @@ void tst_ListResourcesManager::resetResource()
void tst_ListResourcesManager::lookupResource()
{
- Qt3D::QResourceManager<tst_ListResource, uint, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, uint, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
QList<tHandle16> handles;
@@ -246,7 +246,7 @@ void tst_ListResourcesManager::lookupResource()
void tst_ListResourcesManager::releaseResource()
{
- Qt3D::QResourceManager<tst_ListResource, uint, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, uint, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
for (int i = 0; i < 5; i++) {
@@ -268,11 +268,11 @@ class tst_Thread : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ListResource,
+ typedef Qt3DCore::QResourceManager<tst_ListResource,
int,
16,
- Qt3D::ListAllocatingPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ListAllocatingPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread() : QThread()
{
@@ -339,11 +339,11 @@ class tst_Thread2 : public QThread
Q_OBJECT
public:
- typedef Qt3D::QResourceManager<tst_ListResource,
+ typedef Qt3DCore::QResourceManager<tst_ListResource,
int,
16,
- Qt3D::ListAllocatingPolicy,
- Qt3D::ObjectLevelLockingPolicy> Manager;
+ Qt3DCore::ListAllocatingPolicy,
+ Qt3DCore::ObjectLevelLockingPolicy> Manager;
tst_Thread2(int releaseAbove = 7)
: QThread()
@@ -415,7 +415,7 @@ void tst_ListResourcesManager::heavyDutyMultiThreadedAccessRelease()
void tst_ListResourcesManager::maximumNumberOfResources()
{
- Qt3D::QResourceManager<tst_ListResource, uint, 16, Qt3D::ListAllocatingPolicy> manager;
+ Qt3DCore::QResourceManager<tst_ListResource, uint, 16, Qt3DCore::ListAllocatingPolicy> manager;
QList<tst_ListResource *> resources;
QList<tHandle16> handles;
diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp
index 41ddcad43..629c03365 100644
--- a/tests/auto/core/nodes/tst_nodes.cpp
+++ b/tests/auto/core/nodes/tst_nodes.cpp
@@ -84,87 +84,87 @@ private slots:
};
class ObserverSpy;
-class SimplePostman : public Qt3D::QAbstractPostman
+class SimplePostman : public Qt3DCore::QAbstractPostman
{
public:
SimplePostman(ObserverSpy *spy)
: m_spy(spy)
{}
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &) Q_DECL_FINAL {};
- void setScene(Qt3D::QScene *) Q_DECL_FINAL {};
- void notifyBackend(const Qt3D::QSceneChangePtr &change) Q_DECL_FINAL;
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &) Q_DECL_FINAL {};
+ void setScene(Qt3DCore::QScene *) Q_DECL_FINAL {};
+ void notifyBackend(const Qt3DCore::QSceneChangePtr &change) Q_DECL_FINAL;
private:
ObserverSpy *m_spy;
};
-class ObserverSpy : public Qt3D::QAbstractArbiter
+class ObserverSpy : public Qt3DCore::QAbstractArbiter
{
public:
- class ChangeRecord : public QPair<Qt3D::QSceneChangePtr, bool>
+ class ChangeRecord : public QPair<Qt3DCore::QSceneChangePtr, bool>
{
public:
- ChangeRecord(const Qt3D::QSceneChangePtr &event, bool locked)
- : QPair<Qt3D::QSceneChangePtr, bool>(event, locked)
+ ChangeRecord(const Qt3DCore::QSceneChangePtr &event, bool locked)
+ : QPair<Qt3DCore::QSceneChangePtr, bool>(event, locked)
{}
- Qt3D::QSceneChangePtr change() const { return first; }
+ Qt3DCore::QSceneChangePtr change() const { return first; }
bool wasLocked() const { return second; }
};
- ObserverSpy(Qt3D::QNode *node)
- : Qt3D::QAbstractArbiter()
+ ObserverSpy(Qt3DCore::QNode *node)
+ : Qt3DCore::QAbstractArbiter()
, m_node(node)
, m_postman(new SimplePostman(this))
{
- Qt3D::QNodePrivate::get(node)->setArbiter(this);
+ Qt3DCore::QNodePrivate::get(node)->setArbiter(this);
}
~ObserverSpy()
{
- Qt3D::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR);
+ Qt3DCore::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR);
}
- void sceneChangeEventWithLock(const Qt3D::QSceneChangePtr &e) Q_DECL_OVERRIDE
+ void sceneChangeEventWithLock(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE
{
events << ChangeRecord(e, true);
}
- void sceneChangeEventWithLock(const Qt3D::QSceneChangeList &e) Q_DECL_OVERRIDE
+ void sceneChangeEventWithLock(const Qt3DCore::QSceneChangeList &e) Q_DECL_OVERRIDE
{
for (uint i = 0, m = e.size(); i < m; ++i) {
events << ChangeRecord(e.at(i), false);
}
}
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &e) Q_DECL_OVERRIDE
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE
{
events << ChangeRecord(e, false);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman.data();
}
QList<ChangeRecord> events;
- Qt3D::QNode *m_node;
+ Qt3DCore::QNode *m_node;
QScopedPointer<SimplePostman> m_postman;
};
-void SimplePostman::notifyBackend(const Qt3D::QSceneChangePtr &change)
+void SimplePostman::notifyBackend(const Qt3DCore::QSceneChangePtr &change)
{
m_spy->sceneChangeEventWithLock(change);
}
-class MyQNode : public Qt3D::QNode
+class MyQNode : public Qt3DCore::QNode
{
Q_OBJECT
Q_PROPERTY(QString customProperty READ customProperty WRITE setCustomProperty NOTIFY customPropertyChanged)
public:
- explicit MyQNode(Qt3D::QNode *parent = 0)
+ explicit MyQNode(Qt3DCore::QNode *parent = 0)
: QNode(parent)
, m_scene(Q_NULLPTR)
{}
@@ -192,8 +192,8 @@ public:
void assignScene()
{
if (!m_scene)
- m_scene = new Qt3D::QScene();
- Qt3D::QNodePrivate::get(this)->setScene(m_scene);
+ m_scene = new Qt3DCore::QScene();
+ Qt3DCore::QNodePrivate::get(this)->setScene(m_scene);
}
void makeCopyOf(QNode *other)
@@ -208,14 +208,14 @@ protected:
QT3D_CLONEABLE(MyQNode)
QString m_customProperty;
- Qt3D::QScene *m_scene;
+ Qt3DCore::QScene *m_scene;
};
-class MyQComponent : public Qt3D::QComponent
+class MyQComponent : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit MyQComponent(Qt3D::QNode *parent = 0) : QComponent(parent)
+ explicit MyQComponent(Qt3DCore::QNode *parent = 0) : QComponent(parent)
{}
~MyQComponent()
@@ -261,8 +261,8 @@ void tst_Nodes::defaultComponentConstruction()
void tst_Nodes::defaultEntityConstrution()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new Qt3D::QEntity());
- Qt3D::QEntity *entity2 = new Qt3D::QEntity(entity.data());
+ QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity());
+ Qt3DCore::QEntity *entity2 = new Qt3DCore::QEntity(entity.data());
// THEN
QVERIFY(entity->components().isEmpty());
@@ -278,7 +278,7 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneExplicitParenting()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode());
@@ -305,7 +305,7 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneImplicitParenting()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode(node.data()));
@@ -326,11 +326,11 @@ void tst_Nodes::appendMultipleChildNodesToNodeNoScene()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
// WHEN
for (int i = 0; i < 10; i++) {
// WHEN
- Qt3D::QNode *child = Q_NULLPTR;
+ Qt3DCore::QNode *child = Q_NULLPTR;
if (i % 2 == 0) {
child = new MyQNode(node.data());
} else {
@@ -357,7 +357,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneExplicitParenting()
// WHEN
node->assignScene();
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode());
@@ -376,10 +376,10 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneExplicitParenting()
QVERIFY(spy.events.first().wasLocked());
QCOMPARE(node->children().count(), 1);
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeCreated);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeCreated);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QCOMPARE(clone->parentNode()->id(), node->id());
}
@@ -393,7 +393,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneImplicitParenting()
// WHEN
node->assignScene();
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode(node.data()));
@@ -402,16 +402,16 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneImplicitParenting()
// THEN
QVERIFY(child->parent() == node.data());
QVERIFY(child->parentNode() == node.data());
- QVERIFY(Qt3D::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
QCOMPARE(node->children().count(), 1);
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeCreated);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeCreated);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QCOMPARE(clone->parentNode()->id(), node->id());
}
@@ -426,12 +426,12 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
node->assignScene();
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
// WHEN
for (int i = 0; i < 10; i++) {
// WHEN
- Qt3D::QNode *child = Q_NULLPTR;
+ Qt3DCore::QNode *child = Q_NULLPTR;
if (i % 2 == 0) {
child = new MyQNode(node.data());
QCoreApplication::processEvents();
@@ -442,7 +442,7 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
}
// THEN
QVERIFY(child->parent() == node.data());
- QVERIFY(Qt3D::QNodePrivate::get(child)->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child)->scene() != Q_NULLPTR);
}
// THEN
QCOMPARE(node->children().count(), 10);
@@ -452,14 +452,14 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
Q_FOREACH (const ObserverSpy::ChangeRecord &r, spy.events) {
QVERIFY(r.wasLocked());
- Qt3D::QScenePropertyChangePtr event = r.change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeCreated);
+ Qt3DCore::QScenePropertyChangePtr event = r.change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeCreated);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
bool found = false;
Q_FOREACH (QObject *c, node->children()) {
- if (clone->id() == qobject_cast<Qt3D::QNode *>(c)->id()) {
+ if (clone->id() == qobject_cast<Qt3DCore::QNode *>(c)->id()) {
found = true;
QCOMPARE(clone->parentNode()->id(), node->id());
break;
@@ -477,7 +477,7 @@ void tst_Nodes::checkParentChangeToNull()
// WHEN
root->assignScene();
- QScopedPointer<Qt3D::QNode> child(new MyQNode(root.data()));
+ QScopedPointer<Qt3DCore::QNode> child(new MyQNode(root.data()));
QCoreApplication::processEvents();
// THEN
@@ -495,10 +495,10 @@ void tst_Nodes::checkParentChangeToNull()
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeAboutToBeDeleted);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeAboutToBeDeleted);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QVERIFY(!clone->parentNode());
}
@@ -519,14 +519,14 @@ void tst_Nodes::checkParentChangeToOtherParent()
// WHEN
ObserverSpy spyParent1(parent1.data());
ObserverSpy spyParent2(parent2.data());
- QScopedPointer<Qt3D::QNode> child(new MyQNode(parent1.data()));
+ QScopedPointer<Qt3DCore::QNode> child(new MyQNode(parent1.data()));
QCoreApplication::processEvents();
// THEN
QVERIFY(child->parent() == parent1.data());
QCOMPARE(parent1->children().size(), 1);
QCOMPARE(parent2->children().size(), 0);
- QVERIFY(Qt3D::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
QCOMPARE(spyParent1.events.size(), 1);
// WHEN
@@ -542,19 +542,19 @@ void tst_Nodes::checkParentChangeToOtherParent()
// CHECK event 1 is a Node Deleted event
QVERIFY(spyParent1.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spyParent1.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeAboutToBeDeleted);
+ Qt3DCore::QScenePropertyChangePtr event = spyParent1.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeAboutToBeDeleted);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QVERIFY(!clone->parentNode());
// CHECK event 2 is a Node Added event
QVERIFY(spyParent2.events.last().wasLocked());
- event = spyParent2.events.last().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeCreated);
+ event = spyParent2.events.last().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeCreated);
QCOMPARE(event->propertyName(), "node");
- clone = event->value().value<Qt3D::QNodePtr>();
+ clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QVERIFY(clone->parentNode());
}
@@ -564,7 +564,7 @@ void tst_Nodes::removingSingleChildNodeFromNode()
{
// GIVEN
QScopedPointer<MyQNode> root(new MyQNode());
- QScopedPointer<Qt3D::QNode> child(new MyQNode());
+ QScopedPointer<Qt3DCore::QNode> child(new MyQNode());
// WHEN
child->setParent(root.data());
@@ -583,10 +583,10 @@ void tst_Nodes::removingSingleChildNodeFromNode()
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeAboutToBeDeleted);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeAboutToBeDeleted);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), child->id());
QVERIFY(!clone->parentNode());
}
@@ -601,7 +601,7 @@ void tst_Nodes::removingMultipleChildNodesFromNode()
ObserverSpy spy(root.data());
// THEN
- QVERIFY(Qt3D::QNodePrivate::get(root.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->scene() != Q_NULLPTR);
// WHEN
for (int i = 0; i < 10; i++)
@@ -623,10 +623,10 @@ void tst_Nodes::removingMultipleChildNodesFromNode()
QCOMPARE(spy.events.size(), 10);
Q_FOREACH (const ObserverSpy::ChangeRecord &r, spy.events) {
QVERIFY(r.wasLocked());
- Qt3D::QScenePropertyChangePtr event = r.change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeAboutToBeDeleted);
+ Qt3DCore::QScenePropertyChangePtr event = r.change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeAboutToBeDeleted);
QCOMPARE(event->propertyName(), "node");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QVERIFY(!clone->parentNode());
}
}
@@ -637,7 +637,7 @@ void tst_Nodes::appendingChildEntitiesToNode()
QScopedPointer<MyQNode> root(new MyQNode());
// WHEN
- Qt3D::QEntity *childEntity = new Qt3D::QEntity(root.data());
+ Qt3DCore::QEntity *childEntity = new Qt3DCore::QEntity(root.data());
// THEN
QVERIFY(root->children().first() == childEntity);
@@ -651,7 +651,7 @@ void tst_Nodes::removingChildEntitiesFromNode()
QScopedPointer<MyQNode> root(new MyQNode());
// WHEN
- Qt3D::QEntity *childEntity = new Qt3D::QEntity(root.data());
+ Qt3DCore::QEntity *childEntity = new Qt3DCore::QEntity(root.data());
// THEN
QVERIFY(root->children().first() == childEntity);
@@ -670,7 +670,7 @@ void tst_Nodes::removingChildEntitiesFromNode()
void tst_Nodes::appendingParentlessComponentToEntity()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new Qt3D::QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity());
MyQComponent *comp = new MyQComponent();
// THEN
@@ -697,10 +697,10 @@ void tst_Nodes::appendingParentlessComponentToEntity()
// return early in such a case.
// Check that we received ComponentAdded
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::ComponentAdded);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::ComponentAdded);
QCOMPARE(event->propertyName(), "component");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), comp->id());
QVERIFY(!clone->parentNode());
}
@@ -708,7 +708,7 @@ void tst_Nodes::appendingParentlessComponentToEntity()
void tst_Nodes::appendingComponentToEntity()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new Qt3D::QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity());
MyQComponent *comp = new MyQComponent(entity.data());
QCoreApplication::processEvents();
@@ -728,10 +728,10 @@ void tst_Nodes::appendingComponentToEntity()
QVERIFY(comp->parentNode() == entity.data());
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::ComponentAdded);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::ComponentAdded);
QCOMPARE(event->propertyName(), "component");
- Qt3D::QNodePtr clone = event->value().value<Qt3D::QNodePtr>();
+ Qt3DCore::QNodePtr clone = event->value().value<Qt3DCore::QNodePtr>();
QCOMPARE(clone->id(), comp->id());
QVERIFY(!clone->parentNode());
}
@@ -739,7 +739,7 @@ void tst_Nodes::appendingComponentToEntity()
void tst_Nodes::removingComponentFromEntity()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new Qt3D::QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity());
MyQComponent *comp = new MyQComponent();
// WHEN
@@ -760,10 +760,10 @@ void tst_Nodes::removingComponentFromEntity()
QVERIFY(entity->children().count() == 1);
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::ComponentRemoved);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::ComponentRemoved);
QCOMPARE(event->propertyName(), "componentId");
- Qt3D::QNodeId nodeId = event->value().value<Qt3D::QNodeId>();
+ Qt3DCore::QNodeId nodeId = event->value().value<Qt3DCore::QNodeId>();
QCOMPARE(nodeId, comp->id());
}
@@ -777,8 +777,8 @@ void tst_Nodes::changeCustomProperty()
// THEN
QCOMPARE(spy.events.size(), 1);
QVERIFY(spy.events.first().wasLocked());
- Qt3D::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3D::QScenePropertyChange>();
- QCOMPARE(event->type(), Qt3D::NodeUpdated);
+ Qt3DCore::QScenePropertyChangePtr event = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QScenePropertyChange>();
+ QCOMPARE(event->type(), Qt3DCore::NodeUpdated);
QCOMPARE(event->propertyName(), "customProperty");
QCOMPARE(event->value().toString(), QString("foo"));
}
@@ -787,7 +787,7 @@ void tst_Nodes::checkDestruction()
{
// GIVEN
QScopedPointer<MyQNode> root(new MyQNode());
- Qt3D::QEntity *entity = new Qt3D::QEntity(root.data());
+ Qt3DCore::QEntity *entity = new Qt3DCore::QEntity(root.data());
MyQComponent *comp1 = new MyQComponent();
MyQComponent *comp2 = new MyQComponent();
diff --git a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
index 0f6a30c8e..69b7a916e 100644
--- a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
+++ b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_QAspectEngine : public QObject
{
@@ -85,7 +85,7 @@ void tst_QAspectEngine::shouldNotCrashOnShutdownWhenComponentIsCreatedWithParent
// GIVEN
QEntity *root = new QEntity;
// A component parented to an entity...
- QComponent *component = new Qt3D::QTransform(root);
+ QComponent *component = new Qt3DCore::QTransform(root);
// ... created *before* the entity it will be added to.
QEntity *entity = new QEntity(root);
entity->addComponent(component);
diff --git a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
index d52821d42..6da0489e3 100644
--- a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
+++ b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
@@ -38,7 +38,7 @@
#include <Qt3DCore/QAspectFactory>
#include <Qt3DCore/QAbstractAspect>
-using namespace QT_PREPEND_NAMESPACE(Qt3D);
+using namespace QT_PREPEND_NAMESPACE(Qt3DCore);
#define FAKE_ASPECT(ClassName) \
class ClassName : public QAbstractAspect \
diff --git a/tests/auto/core/qboundedcircularbuffer/tst_qboundedcircularbuffer.cpp b/tests/auto/core/qboundedcircularbuffer/tst_qboundedcircularbuffer.cpp
index 2a61cee97..ce4489f4b 100644
--- a/tests/auto/core/qboundedcircularbuffer/tst_qboundedcircularbuffer.cpp
+++ b/tests/auto/core/qboundedcircularbuffer/tst_qboundedcircularbuffer.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/private/qboundedcircularbuffer_p.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_QBoundedCircularBuffer : public QObject
{
diff --git a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
index fd3d622cd..0382ecae6 100644
--- a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
+++ b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
@@ -64,75 +64,75 @@ private slots:
void distributeBackendChanges();
};
-class tst_Node : public Qt3D::QNode
+class tst_Node : public Qt3DCore::QNode
{
public:
- explicit tst_Node(Qt3D::QNode *parent = 0) : Qt3D::QNode(parent)
+ explicit tst_Node(Qt3DCore::QNode *parent = 0) : Qt3DCore::QNode(parent)
{}
void sendNodeAddedNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::NodeAdded, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeAdded, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("NodeAdded");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
void sendNodeRemovedNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::NodeRemoved, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeRemoved, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("NodeRemoved");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
void sendNodeUpdatedNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("NodeUpdated");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
void sendComponentAddedNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::ComponentAdded, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::ComponentAdded, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("ComponentAdded");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
void sendComponentRemovedNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::ComponentRemoved, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::ComponentRemoved, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("ComponentRemoved");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
void sendAllChangesNotification()
{
- Qt3D::QScenePropertyChangePtr e(new Qt3D::QScenePropertyChange(Qt3D::AllChanges, Qt3D::QSceneChange::Node, id()));
+ Qt3DCore::QScenePropertyChangePtr e(new Qt3DCore::QScenePropertyChange(Qt3DCore::AllChanges, Qt3DCore::QSceneChange::Node, id()));
e->setPropertyName("AllChanges");
- Qt3D::QNodePrivate::get(this)->notifyObservers(e);
+ Qt3DCore::QNodePrivate::get(this)->notifyObservers(e);
}
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &change) Q_DECL_OVERRIDE
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE
{
QVERIFY(!change.isNull());
m_lastChanges << change;
}
- Qt3D::QSceneChangePtr lastChange() const
+ Qt3DCore::QSceneChangePtr lastChange() const
{
if (m_lastChanges.isEmpty())
- return Qt3D::QSceneChangePtr();
+ return Qt3DCore::QSceneChangePtr();
return m_lastChanges.last();
}
- QList<Qt3D::QSceneChangePtr> lastChanges() const
+ QList<Qt3DCore::QSceneChangePtr> lastChanges() const
{
return m_lastChanges;
}
// QNode interface
protected:
- Qt3D::QNode *doClone() const
+ Qt3DCore::QNode *doClone() const
{
tst_Node *clone = new tst_Node();
clone->copy(this);
@@ -140,54 +140,54 @@ protected:
}
private:
- QList<Qt3D::QSceneChangePtr> m_lastChanges;
+ QList<Qt3DCore::QSceneChangePtr> m_lastChanges;
};
-class tst_SimpleObserver : public Qt3D::QObserverInterface
+class tst_SimpleObserver : public Qt3DCore::QObserverInterface
{
public:
// QObserverInterface interface
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &e) Q_DECL_OVERRIDE
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE
{
QVERIFY(!e.isNull());
m_lastChanges.append(e);
}
- Qt3D::QSceneChangePtr lastChange() const
+ Qt3DCore::QSceneChangePtr lastChange() const
{
if (m_lastChanges.isEmpty())
- return Qt3D::QSceneChangePtr();
+ return Qt3DCore::QSceneChangePtr();
return m_lastChanges.last();
}
- QList<Qt3D::QSceneChangePtr> lastChanges() const
+ QList<Qt3DCore::QSceneChangePtr> lastChanges() const
{
return m_lastChanges;
}
private:
- QList<Qt3D::QSceneChangePtr> m_lastChanges;
+ QList<Qt3DCore::QSceneChangePtr> m_lastChanges;
};
-class tst_BackendObserverObservable : public Qt3D::QBackendNode
+class tst_BackendObserverObservable : public Qt3DCore::QBackendNode
{
public:
tst_BackendObserverObservable()
- : Qt3D::QBackendNode(ReadWrite)
+ : Qt3DCore::QBackendNode(ReadWrite)
{}
- void updateFromPeer(Qt3D::QNode *) Q_DECL_OVERRIDE
+ void updateFromPeer(Qt3DCore::QNode *) Q_DECL_OVERRIDE
{}
// QObserverInterface interface
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &e) Q_DECL_OVERRIDE
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE
{
QVERIFY(!e.isNull());
m_lastChanges << e;
// Save reply to be sent to the frontend
- m_reply.reset(new Qt3D::QBackendScenePropertyChange(Qt3D::NodeUpdated, e->subjectId()));
+ m_reply.reset(new Qt3DCore::QBackendScenePropertyChange(Qt3DCore::NodeUpdated, e->subjectId()));
m_reply->setTargetNode(e->subjectId());
m_reply->setPropertyName("Reply");
}
@@ -200,21 +200,21 @@ public:
qDebug() << Q_FUNC_INFO;
}
- Qt3D::QSceneChangePtr lastChange() const
+ Qt3DCore::QSceneChangePtr lastChange() const
{
if (m_lastChanges.isEmpty())
- return Qt3D::QSceneChangePtr();
+ return Qt3DCore::QSceneChangePtr();
return m_lastChanges.last();
}
- QList<Qt3D::QSceneChangePtr> lastChanges() const
+ QList<Qt3DCore::QSceneChangePtr> lastChanges() const
{
return m_lastChanges;
}
private:
- QList<Qt3D::QSceneChangePtr> m_lastChanges;
- Qt3D::QBackendScenePropertyChangePtr m_reply;
+ QList<Qt3DCore::QSceneChangePtr> m_lastChanges;
+ Qt3DCore::QBackendScenePropertyChangePtr m_reply;
};
@@ -224,7 +224,7 @@ class ThreadedAnswer : public QThread
{
Q_OBJECT
public:
- ThreadedAnswer(Qt3D::QChangeArbiter *arbiter, tst_BackendObserverObservable *backend)
+ ThreadedAnswer(Qt3DCore::QChangeArbiter *arbiter, tst_BackendObserverObservable *backend)
: QThread()
, m_arbiter(arbiter)
, m_backendObs(backend)
@@ -233,7 +233,7 @@ public:
void run() Q_DECL_OVERRIDE
{
// create backend change queue on QChangeArbiter
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(m_arbiter);
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(m_arbiter);
m_backendObs->sendReply();
// gives time for other threads to start waiting
QThread::currentThread()->sleep(1);
@@ -243,105 +243,105 @@ public:
}
private:
- Qt3D::QChangeArbiter *m_arbiter;
+ Qt3DCore::QChangeArbiter *m_arbiter;
tst_BackendObserverObservable *m_backendObs;
QWaitCondition m_waitingForReplyToBeSent;
};
-class tst_PostManObserver : public Qt3D::QAbstractPostman
+class tst_PostManObserver : public Qt3DCore::QAbstractPostman
{
public:
tst_PostManObserver() : m_sceneInterface(Q_NULLPTR)
{}
- void setScene(Qt3D::QScene *scene) Q_DECL_FINAL
+ void setScene(Qt3DCore::QScene *scene) Q_DECL_FINAL
{
m_sceneInterface = scene;
}
// QObserverInterface interface
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &e)
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
{
QVERIFY(!e.isNull());
- Qt3D::QBackendScenePropertyChangePtr change = qSharedPointerDynamicCast<Qt3D::QBackendScenePropertyChange>(e);
+ Qt3DCore::QBackendScenePropertyChangePtr change = qSharedPointerDynamicCast<Qt3DCore::QBackendScenePropertyChange>(e);
QVERIFY(!change.isNull());
- Qt3D::QNode *targetNode = m_sceneInterface->lookupNode(change->targetNode());
+ Qt3DCore::QNode *targetNode = m_sceneInterface->lookupNode(change->targetNode());
QVERIFY(targetNode != Q_NULLPTR);
m_lastChanges << e;
}
- Qt3D::QSceneChangePtr lastChange() const
+ Qt3DCore::QSceneChangePtr lastChange() const
{
if (m_lastChanges.isEmpty())
- return Qt3D::QSceneChangePtr();
+ return Qt3DCore::QSceneChangePtr();
return m_lastChanges.last();
}
- QList<Qt3D::QSceneChangePtr> lastChanges() const
+ QList<Qt3DCore::QSceneChangePtr> lastChanges() const
{
return m_lastChanges;
}
- void notifyBackend(const Qt3D::QSceneChangePtr &e) Q_DECL_FINAL
+ void notifyBackend(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL
{
m_sceneInterface->arbiter()->sceneChangeEventWithLock(e);
}
private:
- Qt3D::QScene *m_sceneInterface;
- QList<Qt3D::QSceneChangePtr> m_lastChanges;
+ Qt3DCore::QScene *m_sceneInterface;
+ QList<Qt3DCore::QSceneChangePtr> m_lastChanges;
};
-class tst_SceneObserver : public Qt3D::QSceneObserverInterface
+class tst_SceneObserver : public Qt3DCore::QSceneObserverInterface
{
// QSceneObserverInterface interface
public:
- void sceneNodeAdded(Qt3D::QSceneChangePtr &e)
+ void sceneNodeAdded(Qt3DCore::QSceneChangePtr &e)
{
QVERIFY(!e.isNull());
- QVERIFY(e->type() == Qt3D::NodeCreated);
+ QVERIFY(e->type() == Qt3DCore::NodeCreated);
m_lastChange = e;
}
- void sceneNodeRemoved(Qt3D::QSceneChangePtr &e)
+ void sceneNodeRemoved(Qt3DCore::QSceneChangePtr &e)
{
QVERIFY(!e.isNull());
- QVERIFY((e->type() == Qt3D::NodeDeleted || e->type() == Qt3D::NodeAboutToBeDeleted));
+ QVERIFY((e->type() == Qt3DCore::NodeDeleted || e->type() == Qt3DCore::NodeAboutToBeDeleted));
m_lastChange = e;
}
- void sceneNodeUpdated(Qt3D::QSceneChangePtr &e)
+ void sceneNodeUpdated(Qt3DCore::QSceneChangePtr &e)
{
m_lastChange = e;
}
- Qt3D::QSceneChangePtr lastChange() const
+ Qt3DCore::QSceneChangePtr lastChange() const
{
return m_lastChange;
}
private:
- Qt3D::QSceneChangePtr m_lastChange;
+ Qt3DCore::QSceneChangePtr m_lastChange;
};
void tst_QChangeArbiter::registerObservers()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
- QScopedPointer<Qt3D::QAbstractPostman> postman(new tst_PostManObserver);
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
+ QScopedPointer<Qt3DCore::QAbstractPostman> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// WHEN
- Qt3D::QNode *root = new tst_Node();
- Qt3D::QNode *child = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNode *root = new tst_Node();
+ Qt3DCore::QNode *child = new tst_Node();
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
QList<tst_SimpleObserver *> observers;
@@ -361,29 +361,29 @@ void tst_QChangeArbiter::registerObservers()
arbiter->syncChanges();
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
void tst_QChangeArbiter::registerSceneObserver()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
- QScopedPointer<Qt3D::QAbstractPostman> postman(new tst_PostManObserver);
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
+ QScopedPointer<Qt3DCore::QAbstractPostman> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// WHEN
tst_Node *root = new tst_Node();
- Qt3D::QNode *child = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNode *child = new tst_Node();
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
QList<tst_SimpleObserver *> observers;
@@ -415,11 +415,11 @@ void tst_QChangeArbiter::registerSceneObserver()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeCreated);
}
// WHEN
@@ -429,33 +429,33 @@ void tst_QChangeArbiter::registerSceneObserver()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::ComponentAdded);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::ComponentAdded);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeCreated);
}
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
void tst_QChangeArbiter::unregisterObservers()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
- QScopedPointer<Qt3D::QAbstractPostman> postman(new tst_PostManObserver);
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
+ QScopedPointer<Qt3DCore::QAbstractPostman> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// WHEN
tst_Node *root = new tst_Node();
- Qt3D::QNode *child = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNode *child = new tst_Node();
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
QList<tst_SimpleObserver *> observers;
@@ -478,7 +478,7 @@ void tst_QChangeArbiter::unregisterObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
// WHEN
@@ -491,29 +491,29 @@ void tst_QChangeArbiter::unregisterObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
void tst_QChangeArbiter::unregisterSceneObservers()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
- QScopedPointer<Qt3D::QAbstractPostman> postman(new tst_PostManObserver);
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
+ QScopedPointer<Qt3DCore::QAbstractPostman> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// WHEN
tst_Node *root = new tst_Node();
- Qt3D::QNode *child = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNode *child = new tst_Node();
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
QList<tst_SimpleObserver *> observers;
@@ -545,11 +545,11 @@ void tst_QChangeArbiter::unregisterSceneObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeCreated);
}
// WHEN
@@ -559,11 +559,11 @@ void tst_QChangeArbiter::unregisterSceneObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::ComponentAdded);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::ComponentAdded);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeCreated);
}
// WHEN
@@ -573,11 +573,11 @@ void tst_QChangeArbiter::unregisterSceneObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeAboutToBeDeleted);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeAboutToBeDeleted);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeAboutToBeDeleted);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeAboutToBeDeleted);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers)
@@ -590,32 +590,32 @@ void tst_QChangeArbiter::unregisterSceneObservers()
// THEN
Q_FOREACH (tst_SimpleObserver *o, observers) {
QVERIFY(!o->lastChange().isNull());
- QVERIFY(o->lastChange()->type() == Qt3D::NodeCreated);
+ QVERIFY(o->lastChange()->type() == Qt3DCore::NodeCreated);
}
Q_FOREACH (tst_SceneObserver *s, sceneObservers) {
QVERIFY(!s->lastChange().isNull());
- QVERIFY(s->lastChange()->type() == Qt3D::NodeAboutToBeDeleted);
+ QVERIFY(s->lastChange()->type() == Qt3DCore::NodeAboutToBeDeleted);
}
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
void tst_QChangeArbiter::distributeFrontendChanges()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
- QScopedPointer<Qt3D::QAbstractPostman> postman(new tst_PostManObserver);
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
+ QScopedPointer<Qt3DCore::QAbstractPostman> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// WHEN
tst_Node *root = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
tst_SimpleObserver *backendAllChangedObserver = new tst_SimpleObserver();
@@ -626,11 +626,11 @@ void tst_QChangeArbiter::distributeFrontendChanges()
tst_SimpleObserver *backendComponentRemovedObserver = new tst_SimpleObserver();
arbiter->registerObserver(backendAllChangedObserver, root->id());
- arbiter->registerObserver(backendNodeAddedObserver, root->id(), Qt3D::NodeAdded);
- arbiter->registerObserver(backendNodeUpdatedObserver, root->id(), Qt3D::NodeUpdated);
- arbiter->registerObserver(backendNodeRemovedObserver, root->id(), Qt3D::NodeRemoved);
- arbiter->registerObserver(backendComponentAddedObserver, root->id(), Qt3D::ComponentAdded);
- arbiter->registerObserver(backendComponentRemovedObserver, root->id(), Qt3D::ComponentRemoved);
+ arbiter->registerObserver(backendNodeAddedObserver, root->id(), Qt3DCore::NodeAdded);
+ arbiter->registerObserver(backendNodeUpdatedObserver, root->id(), Qt3DCore::NodeUpdated);
+ arbiter->registerObserver(backendNodeRemovedObserver, root->id(), Qt3DCore::NodeRemoved);
+ arbiter->registerObserver(backendComponentAddedObserver, root->id(), Qt3DCore::ComponentAdded);
+ arbiter->registerObserver(backendComponentRemovedObserver, root->id(), Qt3DCore::ComponentRemoved);
arbiter->syncChanges();
@@ -714,22 +714,22 @@ void tst_QChangeArbiter::distributeFrontendChanges()
QCOMPARE(backendComponentAddedObserver->lastChanges().count(), 2);
QCOMPARE(backendComponentRemovedObserver->lastChanges().count(), 2);
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
void tst_QChangeArbiter::distributeBackendChanges()
{
// GIVEN
- QScopedPointer<Qt3D::QChangeArbiter> arbiter(new Qt3D::QChangeArbiter());
- QScopedPointer<Qt3D::QScene> scene(new Qt3D::QScene());
+ QScopedPointer<Qt3DCore::QChangeArbiter> arbiter(new Qt3DCore::QChangeArbiter());
+ QScopedPointer<Qt3DCore::QScene> scene(new Qt3DCore::QScene());
QScopedPointer<tst_PostManObserver> postman(new tst_PostManObserver);
arbiter->setPostman(postman.data());
arbiter->setScene(scene.data());
postman->setScene(scene.data());
scene->setArbiter(arbiter.data());
// Replaces initialize as we have no JobManager in this case
- Qt3D::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::createThreadLocalChangeQueue(arbiter.data());
// In order for backend -> frontend changes to work properly,
// the backend notification should only be sent
@@ -740,13 +740,13 @@ void tst_QChangeArbiter::distributeBackendChanges()
// WHEN
tst_Node *root = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene.data());
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene.data());
scene->addObservable(root);
tst_BackendObserverObservable *backenObserverObservable = new tst_BackendObserverObservable();
- arbiter->registerObserver(Qt3D::QBackendNodePrivate::get(backenObserverObservable), root->id());
- arbiter->scene()->addObservable(Qt3D::QBackendNodePrivate::get(backenObserverObservable), root->id());
- Qt3D::QBackendNodePrivate::get(backenObserverObservable)->setArbiter(arbiter.data());
+ arbiter->registerObserver(Qt3DCore::QBackendNodePrivate::get(backenObserverObservable), root->id());
+ arbiter->scene()->addObservable(Qt3DCore::QBackendNodePrivate::get(backenObserverObservable), root->id());
+ Qt3DCore::QBackendNodePrivate::get(backenObserverObservable)->setArbiter(arbiter.data());
arbiter->syncChanges();
@@ -786,16 +786,16 @@ void tst_QChangeArbiter::distributeBackendChanges()
QCOMPARE(postman->lastChanges().count(), 1);
// verify correctness of the reply
- Qt3D::QBackendScenePropertyChangePtr c = qSharedPointerDynamicCast<Qt3D::QBackendScenePropertyChange>(postman->lastChange());
+ Qt3DCore::QBackendScenePropertyChangePtr c = qSharedPointerDynamicCast<Qt3DCore::QBackendScenePropertyChange>(postman->lastChange());
QVERIFY(!c.isNull());
QVERIFY(c->targetNode() == root->id());
qDebug() << c->propertyName();
QVERIFY(strcmp(c->propertyName(), "Reply") == 0);
- QVERIFY(c->type() == Qt3D::NodeUpdated);
+ QVERIFY(c->type() == Qt3DCore::NodeUpdated);
answer->exit();
answer->wait();
- Qt3D::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
+ Qt3DCore::QChangeArbiter::destroyThreadLocalChangeQueue(arbiter.data());
}
QTEST_GUILESS_MAIN(tst_QChangeArbiter)
diff --git a/tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp b/tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp
index 8e76ce843..cc923d052 100644
--- a/tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp
+++ b/tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/private/qcircularbuffer_p.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_QCircularBuffer : public QObject
{
diff --git a/tests/auto/core/qentity/tst_qentity.cpp b/tests/auto/core/qentity/tst_qentity.cpp
index 2f7ebf314..042b62386 100644
--- a/tests/auto/core/qentity/tst_qentity.cpp
+++ b/tests/auto/core/qentity/tst_qentity.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/qcomponent.h>
#include <QtCore/qscopedpointer.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_Entity : public QObject
{
@@ -66,11 +66,11 @@ private slots:
void verifyCopy();
};
-class MyQComponent : public Qt3D::QComponent
+class MyQComponent : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit MyQComponent(Qt3D::QNode *parent = 0)
+ explicit MyQComponent(Qt3DCore::QNode *parent = 0)
: QComponent(parent)
{}
@@ -84,14 +84,14 @@ protected:
};
-class MyEntity : public Qt3D::QEntity
+class MyEntity : public Qt3DCore::QEntity
{
public:
- explicit MyEntity(Qt3D::QNode *parent = 0)
+ explicit MyEntity(Qt3DCore::QNode *parent = 0)
: QEntity(parent)
{}
- void makeCopyOf(Qt3D::QEntity *other)
+ void makeCopyOf(Qt3DCore::QEntity *other)
{
QEntity::copy(other);
}
@@ -119,7 +119,7 @@ void tst_Entity::constructionDestruction()
void tst_Entity::addComponentSingleParentSingleAggregation()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new QEntity());
MyQComponent *comp = new MyQComponent(entity.data());
QCoreApplication::processEvents();
@@ -142,8 +142,8 @@ void tst_Entity::addComponentSingleParentSingleAggregation()
void tst_Entity::addComponentSingleParentSeveralAggregations()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -193,8 +193,8 @@ void tst_Entity::addComponentSingleParentSeveralAggregations()
void tst_Entity::addComponentsSeveralParentsSingleAggregations()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -241,8 +241,8 @@ void tst_Entity::addComponentsSeveralParentsSingleAggregations()
void tst_Entity::addComponentsSeveralParentsSeveralAggregations()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -292,7 +292,7 @@ void tst_Entity::addComponentsSeveralParentsSeveralAggregations()
void tst_Entity::removeComponentSingleParentSingleAggregation()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new QEntity());
MyQComponent *comp = new MyQComponent(entity.data());
QCoreApplication::processEvents();
entity->addComponent(comp);
@@ -316,8 +316,8 @@ void tst_Entity::removeComponentSingleParentSingleAggregation()
void tst_Entity::removeComponentSingleParentSeveralAggregations()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -391,8 +391,8 @@ void tst_Entity::removeComponentSingleParentSeveralAggregations()
void tst_Entity::removeComponentsSeveralParentsSingleAggreation()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -443,8 +443,8 @@ void tst_Entity::removeComponentsSeveralParentsSingleAggreation()
void tst_Entity::removeComponentsSeveralParentsSeveralAggregations()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity1(new QEntity());
- QScopedPointer<Qt3D::QEntity> entity2(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity1(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity2(new QEntity());
MyQComponent *comp1 = new MyQComponent(entity1.data());
MyQComponent *comp2 = new MyQComponent(entity1.data());
@@ -519,7 +519,7 @@ void tst_Entity::removeComponentsSeveralParentsSeveralAggregations()
void tst_Entity::addSeveralTimesSameComponent()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new QEntity());
MyQComponent *comp = new MyQComponent(entity.data());
QCoreApplication::processEvents();
entity->addComponent(comp);
@@ -543,7 +543,7 @@ void tst_Entity::addSeveralTimesSameComponent()
void tst_Entity::removeSeveralTimesSameComponent()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> entity(new QEntity());
+ QScopedPointer<Qt3DCore::QEntity> entity(new QEntity());
MyQComponent *comp = new MyQComponent(entity.data());
QCoreApplication::processEvents();
entity->addComponent(comp);
@@ -568,7 +568,7 @@ void tst_Entity::removeSeveralTimesSameComponent()
void tst_Entity::verifyCopy()
{
// GIVEN
- QScopedPointer<Qt3D::QEntity> root(new Qt3D::QEntity());
+ QScopedPointer<Qt3DCore::QEntity> root(new Qt3DCore::QEntity());
MyEntity *parentLessEntity = new MyEntity();
MyEntity *parentedEntity = new MyEntity(root.data());
diff --git a/tests/auto/core/qframeallocator/tst_qframeallocator.cpp b/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
index e78cf568f..cf420bf19 100644
--- a/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
+++ b/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
@@ -110,7 +110,7 @@ private slots:
void tst_QFrameAllocator::initQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -127,7 +127,7 @@ void tst_QFrameAllocator::initQFrameChunk()
void tst_QFrameAllocator::singleAllocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -143,7 +143,7 @@ void tst_QFrameAllocator::singleAllocationQFrameChunk()
void tst_QFrameAllocator::qvectorAllocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -159,7 +159,7 @@ void tst_QFrameAllocator::qvectorAllocationQFrameChunk()
void tst_QFrameAllocator::multipleAllocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -180,7 +180,7 @@ void tst_QFrameAllocator::multipleAllocationQFrameChunk()
void tst_QFrameAllocator::overflowAllocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -206,7 +206,7 @@ void tst_QFrameAllocator::overflowAllocationQFrameChunk()
void tst_QFrameAllocator::singleDeallocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -227,7 +227,7 @@ void tst_QFrameAllocator::singleDeallocationQFrameChunk()
void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
@@ -291,8 +291,8 @@ void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
void tst_QFrameAllocator::containsCheckQFrameChunk()
{
- Qt3D::QFrameChunk c;
- Qt3D::QFrameChunk c2;
+ Qt3DCore::QFrameChunk c;
+ Qt3DCore::QFrameChunk c2;
c.init(16, 12);
c2.init(16, 12);
@@ -322,7 +322,7 @@ void tst_QFrameAllocator::containsCheckQFrameChunk()
void tst_QFrameAllocator::clearQFrameChunk()
{
- Qt3D::QFrameChunk c;
+ Qt3DCore::QFrameChunk c;
c.init(16, 12);
QList<void *> ptrs;
@@ -342,7 +342,7 @@ void tst_QFrameAllocator::clearQFrameChunk()
void tst_QFrameAllocator::initQFixedFrameAllocator()
{
- Qt3D::QFixedFrameAllocator f;
+ Qt3DCore::QFixedFrameAllocator f;
f.init(4);
@@ -352,7 +352,7 @@ void tst_QFrameAllocator::initQFixedFrameAllocator()
void tst_QFrameAllocator::allocateQFixedFrameAllocator()
{
- Qt3D::QFixedFrameAllocator f;
+ Qt3DCore::QFixedFrameAllocator f;
f.init(4, 128);
@@ -390,7 +390,7 @@ void tst_QFrameAllocator::allocateQFixedFrameAllocator()
void tst_QFrameAllocator::deallocateQFixedFrameAllocator()
{
- Qt3D::QFixedFrameAllocator f;
+ Qt3DCore::QFixedFrameAllocator f;
f.init(4);
@@ -429,7 +429,7 @@ void tst_QFrameAllocator::deallocateQFixedFrameAllocator()
void tst_QFrameAllocator::checkFragmentationQFixedFrameAllocator()
{
- Qt3D::QFixedFrameAllocator f;
+ Qt3DCore::QFixedFrameAllocator f;
f.init(4);
@@ -459,7 +459,7 @@ void tst_QFrameAllocator::checkFragmentationQFixedFrameAllocator()
void tst_QFrameAllocator::clearQFixedFrameAllocator()
{
- Qt3D::QFixedFrameAllocator f;
+ Qt3DCore::QFixedFrameAllocator f;
f.init(16);
@@ -485,17 +485,17 @@ void tst_QFrameAllocator::clearQFixedFrameAllocator()
void tst_QFrameAllocator::initQFrameAllocator()
{
- Qt3D::QFrameAllocator f(4, 4);
+ Qt3DCore::QFrameAllocator f(4, 4);
QCOMPARE(f.allocatorPoolSize(), 1);
- Qt3D::QFrameAllocator f2(32, 4);
+ Qt3DCore::QFrameAllocator f2(32, 4);
QCOMPARE(f2.allocatorPoolSize(), 8);
}
void tst_QFrameAllocator::allocateWithQFrameAllocator()
{
- Qt3D::QFrameAllocator f2(256, 4);
+ Qt3DCore::QFrameAllocator f2(256, 4);
QCOMPARE(f2.allocatorPoolSize(), 256 / 4);
QVERIFY(f2.allocate<small>());
@@ -537,7 +537,7 @@ void tst_QFrameAllocator::allocateWithQFrameAllocator()
void tst_QFrameAllocator::deallocateWithQFrameAllocator()
{
- Qt3D::QFrameAllocator f2(256, 4);
+ Qt3DCore::QFrameAllocator f2(256, 4);
QCOMPARE(f2.allocatorPoolSize(), 256 / 4);
small *s = f2.allocate<small>();
@@ -557,7 +557,7 @@ void tst_QFrameAllocator::deallocateWithQFrameAllocator()
void tst_QFrameAllocator::testAllocationComposedValues()
{
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
composed t;
@@ -600,7 +600,7 @@ void tst_QFrameAllocator::testAllocationComposedValues()
void tst_QFrameAllocator::allocateSubclass()
{
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
QList<composed *> composeds;
@@ -626,7 +626,7 @@ void tst_QFrameAllocator::allocateSubclass()
void tst_QFrameAllocator::deallocateSubclass()
{
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
const int NUM_ITEMS = 256;
@@ -655,7 +655,7 @@ void tst_QFrameAllocator::deallocateSubclass()
void tst_QFrameAllocator::clearQFrameAllocator()
{
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
for (int i = 0; i < 256; i++) {
f.allocate<composed>();
@@ -683,7 +683,7 @@ void tst_QFrameAllocator::clearQFrameAllocator()
void tst_QFrameAllocator::isEmptyQFrameAllocator()
{
// GIVEN
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
// WHEN
@@ -720,7 +720,7 @@ void tst_QFrameAllocator::isEmptyQFrameAllocator()
void tst_QFrameAllocator::subclassPointerClearing()
{
// GIVEN
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
QVector<composed *> data;
// WHEN
@@ -746,7 +746,7 @@ void tst_QFrameAllocator::subclassPointerClearing()
void tst_QFrameAllocator::allocateWithRawMemoryDeallocate()
{
// GIVEN
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
subclass *s = static_cast<subclass *>(f.allocateRawMemory(sizeof(subclass)));
new (s) subclass();
@@ -760,7 +760,7 @@ void tst_QFrameAllocator::allocateWithRawMemoryDeallocate()
void tst_QFrameAllocator::allocateDeallocateRawMemory()
{
// GIVEN
- Qt3D::QFrameAllocator f(128, 32);
+ Qt3DCore::QFrameAllocator f(128, 32);
subclass *s = f.allocate<subclass>();
// WHEN
diff --git a/tests/auto/core/qray3d/tst_qray3d.cpp b/tests/auto/core/qray3d/tst_qray3d.cpp
index 1f4f829a2..00253d4c4 100644
--- a/tests/auto/core/qray3d/tst_qray3d.cpp
+++ b/tests/auto/core/qray3d/tst_qray3d.cpp
@@ -139,11 +139,11 @@ void tst_QRay3D::create()
{
QFETCH(QVector3D, point);
QFETCH(QVector3D, direction);
- Qt3D::QRay3D ray(point, direction);
+ Qt3DCore::QRay3D ray(point, direction);
QVERIFY(fuzzyCompare(ray.direction(), direction));
QVERIFY(fuzzyCompare(ray.origin(), point));
- Qt3D::QRay3D ray2;
+ Qt3DCore::QRay3D ray2;
QCOMPARE(ray2.origin(), QVector3D(0, 0, 0));
QCOMPARE(ray2.direction(), QVector3D(0, 0, 1));
ray2.setOrigin(point);
@@ -196,7 +196,7 @@ void tst_QRay3D::projection()
QFETCH(QVector3D, direction);
QFETCH(QVector3D, vector);
QFETCH(QVector3D, expected);
- Qt3D::QRay3D line(point, direction);
+ Qt3DCore::QRay3D line(point, direction);
QVector3D result = line.project(vector);
QVERIFY(fuzzyCompare(result, expected));
}
@@ -245,7 +245,7 @@ void tst_QRay3D::point()
QFETCH(QVector3D, direction);
QFETCH(QVector3D, point_on_line_pos_0_6);
QFETCH(QVector3D, point_on_line_neg_7_2);
- Qt3D::QRay3D line(point, direction);
+ Qt3DCore::QRay3D line(point, direction);
QVERIFY(fuzzyCompare(line.point(0.6), point_on_line_pos_0_6));
QVERIFY(fuzzyCompare(line.point(-7.2), point_on_line_neg_7_2));
QVERIFY(fuzzyCompare(line.projectedDistance(point_on_line_pos_0_6), 0.6));
@@ -335,7 +335,7 @@ void tst_QRay3D::contains_point()
QFETCH(QVector3D, point);
QFETCH(bool, contains);
- Qt3D::QRay3D line(origin, direction);
+ Qt3DCore::QRay3D line(origin, direction);
QCOMPARE(line.contains(point), contains);
}
@@ -351,23 +351,23 @@ void tst_QRay3D::contains_ray()
QFETCH(QVector3D, point);
QFETCH(bool, contains);
- Qt3D::QRay3D line(origin, direction);
+ Qt3DCore::QRay3D line(origin, direction);
if (contains) {
- Qt3D::QRay3D line2(point, direction);
+ Qt3DCore::QRay3D line2(point, direction);
QVERIFY(line.contains(line2));
QVERIFY(line2.contains(line));
// Reversed direction is also contained.
- Qt3D::QRay3D line3(point, -direction);
+ Qt3DCore::QRay3D line3(point, -direction);
QVERIFY(line.contains(line2));
QVERIFY(line2.contains(line));
// Different direction.
- Qt3D::QRay3D line4(point, QVector3D(direction.y(), direction.x(), direction.z()));
+ Qt3DCore::QRay3D line4(point, QVector3D(direction.y(), direction.x(), direction.z()));
QVERIFY(!line.contains(line4));
QVERIFY(!line4.contains(line));
} else {
- Qt3D::QRay3D line2(point, direction);
+ Qt3DCore::QRay3D line2(point, direction);
QVERIFY(!line.contains(line2));
QVERIFY(!line2.contains(line));
}
@@ -412,15 +412,15 @@ void tst_QRay3D::distance()
QFETCH(QVector3D, point);
QFETCH(float, distance);
- Qt3D::QRay3D line(origin, direction);
+ Qt3DCore::QRay3D line(origin, direction);
QCOMPARE(line.distance(point), distance);
}
void tst_QRay3D::compare()
{
- Qt3D::QRay3D ray1(QVector3D(10, 20, 30), QVector3D(-3, -4, -5));
- Qt3D::QRay3D ray2(QVector3D(10, 20, 30), QVector3D(1.5f, 2.0f, 2.5f));
- Qt3D::QRay3D ray3(QVector3D(0, 20, 30), QVector3D(-3, -4, -5));
+ Qt3DCore::QRay3D ray1(QVector3D(10, 20, 30), QVector3D(-3, -4, -5));
+ Qt3DCore::QRay3D ray2(QVector3D(10, 20, 30), QVector3D(1.5f, 2.0f, 2.5f));
+ Qt3DCore::QRay3D ray3(QVector3D(0, 20, 30), QVector3D(-3, -4, -5));
QVERIFY(ray1 == ray1);
QVERIFY(!(ray1 != ray1));
QVERIFY(qFuzzyCompare(ray1, ray1));
@@ -435,7 +435,7 @@ void tst_QRay3D::compare()
void tst_QRay3D::dataStream()
{
#ifndef QT_NO_DATASTREAM
- Qt3D::QRay3D ray(QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
+ Qt3DCore::QRay3D ray(QVector3D(1.0f, 2.0f, 3.0f), QVector3D(4.0f, 5.0f, 6.0f));
QByteArray data;
{
@@ -443,7 +443,7 @@ void tst_QRay3D::dataStream()
stream << ray;
}
- Qt3D::QRay3D ray2;
+ Qt3DCore::QRay3D ray2;
{
QDataStream stream2(data);
stream2 >> ray2;
@@ -468,9 +468,9 @@ void tst_QRay3D::transform()
m.rotate(45.0f, 1.0f, 1.0f, 1.0f);
m.scale(23.5f);
- Qt3D::QRay3D ray1(point, direction);
- Qt3D::QRay3D ray2(ray1);
- Qt3D::QRay3D ray3;
+ Qt3DCore::QRay3D ray1(point, direction);
+ Qt3DCore::QRay3D ray2(ray1);
+ Qt3DCore::QRay3D ray3;
ray1.transform(m);
ray3 = ray2.transformed(m);
@@ -485,15 +485,15 @@ void tst_QRay3D::transform()
class tst_QRay3DProperties : public QObject
{
Q_OBJECT
- Q_PROPERTY(Qt3D::QRay3D ray READ ray WRITE setRay)
+ Q_PROPERTY(Qt3DCore::QRay3D ray READ ray WRITE setRay)
public:
tst_QRay3DProperties(QObject *parent = 0) : QObject(parent) {}
- Qt3D::QRay3D ray() const { return r; }
- void setRay(const Qt3D::QRay3D& value) { r = value; }
+ Qt3DCore::QRay3D ray() const { return r; }
+ void setRay(const Qt3DCore::QRay3D& value) { r = value; }
private:
- Qt3D::QRay3D r;
+ Qt3DCore::QRay3D r;
};
// Test getting and setting properties via the metaobject system.
@@ -501,35 +501,35 @@ void tst_QRay3D::properties()
{
tst_QRay3DProperties obj;
- qRegisterMetaType<Qt3D::QRay3D>();
+ qRegisterMetaType<Qt3DCore::QRay3D>();
- obj.setRay(Qt3D::QRay3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6)));
+ obj.setRay(Qt3DCore::QRay3D(QVector3D(1, 2, 3), QVector3D(4, 5, 6)));
- Qt3D::QRay3D r = qvariant_cast<Qt3D::QRay3D>(obj.property("ray"));
+ Qt3DCore::QRay3D r = qvariant_cast<Qt3DCore::QRay3D>(obj.property("ray"));
QCOMPARE(r.origin(), QVector3D(1, 2, 3));
QCOMPARE(r.direction(), QVector3D(4, 5, 6));
obj.setProperty("ray",
qVariantFromValue
- (Qt3D::QRay3D(QVector3D(-1, -2, -3), QVector3D(-4, -5, -6))));
+ (Qt3DCore::QRay3D(QVector3D(-1, -2, -3), QVector3D(-4, -5, -6))));
- r = qvariant_cast<Qt3D::QRay3D>(obj.property("ray"));
+ r = qvariant_cast<Qt3DCore::QRay3D>(obj.property("ray"));
QCOMPARE(r.origin(), QVector3D(-1, -2, -3));
QCOMPARE(r.direction(), QVector3D(-4, -5, -6));
}
void tst_QRay3D::metaTypes()
{
- int id = qMetaTypeId<Qt3D::QRay3D>();
- QVERIFY(QMetaType::type("Qt3D::QRay3D") == id);
- QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("Qt3D::QRay3D"));
+ int id = qMetaTypeId<Qt3DCore::QRay3D>();
+ QVERIFY(QMetaType::type("Qt3DCore::QRay3D") == id);
+ QCOMPARE(QByteArray(QMetaType::typeName(id)), QByteArray("Qt3DCore::QRay3D"));
QVERIFY(QMetaType::isRegistered(id));
}
void tst_QRay3D::shouldNotAllowNullDirection()
{
// GIVEN
- Qt3D::QRay3D ray;
+ Qt3DCore::QRay3D ray;
QCOMPARE(ray.origin(), QVector3D(0, 0, 0));
QCOMPARE(ray.direction(), QVector3D(0, 0, 1));
diff --git a/tests/auto/core/qscene/tst_qscene.cpp b/tests/auto/core/qscene/tst_qscene.cpp
index e5d30eccf..a907a62ba 100644
--- a/tests/auto/core/qscene/tst_qscene.cpp
+++ b/tests/auto/core/qscene/tst_qscene.cpp
@@ -62,34 +62,34 @@ private slots:
void hasEntityForComponent();
};
-class tst_LockableObserver : public Qt3D::QLockableObserverInterface
+class tst_LockableObserver : public Qt3DCore::QLockableObserverInterface
{
public:
- void sceneChangeEvent(const Qt3D::QSceneChangePtr &) Q_DECL_OVERRIDE {}
- void sceneChangeEventWithLock(const Qt3D::QSceneChangePtr &) Q_DECL_OVERRIDE {}
- void sceneChangeEventWithLock(const Qt3D::QSceneChangeList &) Q_DECL_OVERRIDE {}
+ void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &) Q_DECL_OVERRIDE {}
+ void sceneChangeEventWithLock(const Qt3DCore::QSceneChangePtr &) Q_DECL_OVERRIDE {}
+ void sceneChangeEventWithLock(const Qt3DCore::QSceneChangeList &) Q_DECL_OVERRIDE {}
};
-class tst_Observable : public Qt3D::QObservableInterface
+class tst_Observable : public Qt3DCore::QObservableInterface
{
public:
- void setArbiter(Qt3D::QLockableObserverInterface *observer)
+ void setArbiter(Qt3DCore::QLockableObserverInterface *observer)
{
m_arbiter = observer;
}
protected:
- void notifyObservers(const Qt3D::QSceneChangePtr &) {}
+ void notifyObservers(const Qt3DCore::QSceneChangePtr &) {}
private:
- Qt3D::QLockableObserverInterface *m_arbiter;
+ Qt3DCore::QLockableObserverInterface *m_arbiter;
};
-class tst_Node : public Qt3D::QNode
+class tst_Node : public Qt3DCore::QNode
{
Q_OBJECT
public:
- tst_Node() : Qt3D::QNode()
+ tst_Node() : Qt3DCore::QNode()
{}
~tst_Node()
@@ -101,11 +101,11 @@ protected:
QT3D_CLONEABLE(tst_Node)
};
-class tst_Component : public Qt3D::QComponent
+class tst_Component : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- tst_Component() : Qt3D::QComponent()
+ tst_Component() : Qt3DCore::QComponent()
{}
~tst_Component()
@@ -120,15 +120,15 @@ protected:
void tst_QScene::addObservable()
{
// GIVEN
- Qt3D::QNode *node1 = new tst_Node();
- Qt3D::QNode *node2 = new tst_Node();
+ Qt3DCore::QNode *node1 = new tst_Node();
+ Qt3DCore::QNode *node2 = new tst_Node();
QList<tst_Observable *> observables;
for (int i = 0; i < 10; i++)
observables.append(new tst_Observable());
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
scene->setArbiter(new tst_LockableObserver);
// WHEN
@@ -138,18 +138,18 @@ void tst_QScene::addObservable()
for (int i = 0; i < 5; i++)
scene->addObservable(observables.at(i + 5), node2->id());
- Qt3D::QObservableList obs1 = scene->lookupObservables(node1->id());
- Qt3D::QObservableList obs2 = scene->lookupObservables(node2->id());
+ Qt3DCore::QObservableList obs1 = scene->lookupObservables(node1->id());
+ Qt3DCore::QObservableList obs2 = scene->lookupObservables(node2->id());
// THEN
QCOMPARE(obs1.count(), 5);
QCOMPARE(obs2.count(), obs1.count());
- Q_FOREACH (Qt3D::QObservableInterface *o, obs1) {
+ Q_FOREACH (Qt3DCore::QObservableInterface *o, obs1) {
QVERIFY(scene->nodeIdFromObservable(o) == node1->id());
QVERIFY(scene->lookupNode(node1->id()) == Q_NULLPTR);
}
- Q_FOREACH (Qt3D::QObservableInterface *o, obs2) {
+ Q_FOREACH (Qt3DCore::QObservableInterface *o, obs2) {
QVERIFY(scene->nodeIdFromObservable(o) == node2->id());
QVERIFY(scene->lookupNode(node2->id()) == Q_NULLPTR);
}
@@ -158,12 +158,12 @@ void tst_QScene::addObservable()
void tst_QScene::addNodeObservable()
{
// GIBEN
- QList<Qt3D::QNode *> nodes;
+ QList<Qt3DCore::QNode *> nodes;
for (int i = 0; i < 10; i++)
nodes.append(new tst_Node());
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
scene->setArbiter(new tst_LockableObserver);
// WHEN
@@ -171,7 +171,7 @@ void tst_QScene::addNodeObservable()
scene->addObservable(nodes.at(i));
// THEN
- Q_FOREACH (Qt3D::QNode *n, nodes) {
+ Q_FOREACH (Qt3DCore::QNode *n, nodes) {
QVERIFY(n == scene->lookupNode(n->id()));
QVERIFY(scene->lookupObservables(n->id()).isEmpty());
}
@@ -180,15 +180,15 @@ void tst_QScene::addNodeObservable()
void tst_QScene::removeObservable()
{
// GIVEN
- Qt3D::QNode *node1 = new tst_Node();
- Qt3D::QNode *node2 = new tst_Node();
+ Qt3DCore::QNode *node1 = new tst_Node();
+ Qt3DCore::QNode *node2 = new tst_Node();
QList<tst_Observable *> observables;
for (int i = 0; i < 10; i++)
observables.append(new tst_Observable());
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
scene->setArbiter(new tst_LockableObserver);
// WHEN
@@ -198,8 +198,8 @@ void tst_QScene::removeObservable()
for (int i = 0; i < 5; i++)
scene->addObservable(observables.at(i + 5), node2->id());
- Qt3D::QObservableList obs1 = scene->lookupObservables(node1->id());
- Qt3D::QObservableList obs2 = scene->lookupObservables(node2->id());
+ Qt3DCore::QObservableList obs1 = scene->lookupObservables(node1->id());
+ Qt3DCore::QObservableList obs2 = scene->lookupObservables(node2->id());
// THEN
QCOMPARE(obs1.count(), 5);
@@ -225,21 +225,21 @@ void tst_QScene::removeObservable()
scene->removeObservable(observables.at(0), node2->id());
// THEN
QCOMPARE(scene->lookupObservables(node2->id()).count(), 5);
- QVERIFY(scene->nodeIdFromObservable(observables.at(0)) == Qt3D::QNodeId());
+ QVERIFY(scene->nodeIdFromObservable(observables.at(0)) == Qt3DCore::QNodeId());
}
void tst_QScene::removeNodeObservable()
{
// GIVEN
- Qt3D::QNode *node1 = new tst_Node();
- Qt3D::QNode *node2 = new tst_Node();
+ Qt3DCore::QNode *node1 = new tst_Node();
+ Qt3DCore::QNode *node2 = new tst_Node();
QList<tst_Observable *> observables;
for (int i = 0; i < 10; i++)
observables.append(new tst_Observable());
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
scene->setArbiter(new tst_LockableObserver);
// WHEN
@@ -253,8 +253,8 @@ void tst_QScene::removeNodeObservable()
scene->addObservable(observables.at(i + 5), node2->id());
// THEN
- Qt3D::QObservableList obs1 = scene->lookupObservables(node1->id());
- Qt3D::QObservableList obs2 = scene->lookupObservables(node2->id());
+ Qt3DCore::QObservableList obs1 = scene->lookupObservables(node1->id());
+ Qt3DCore::QObservableList obs2 = scene->lookupObservables(node2->id());
QCOMPARE(obs1.count(), 5);
QCOMPARE(obs2.count(), obs1.count());
@@ -265,7 +265,7 @@ void tst_QScene::removeNodeObservable()
// THEN
QVERIFY(scene->lookupNode(node1->id()) == Q_NULLPTR);
QVERIFY(scene->lookupObservables(node1->id()).empty());
- QVERIFY(scene->nodeIdFromObservable(observables.at(0)) == Qt3D::QNodeId());
+ QVERIFY(scene->nodeIdFromObservable(observables.at(0)) == Qt3DCore::QNodeId());
QVERIFY(scene->lookupNode(node2->id()) == node2);
QCOMPARE(scene->lookupObservables(node2->id()).count(), 5);
@@ -275,12 +275,12 @@ void tst_QScene::removeNodeObservable()
void tst_QScene::addChildNode()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
- QList<Qt3D::QNode *> nodes;
+ QList<Qt3DCore::QNode *> nodes;
- Qt3D::QNode *root = new tst_Node();
- Qt3D::QNodePrivate::get(root)->setScene(scene);
+ Qt3DCore::QNode *root = new tst_Node();
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene);
// WHEN
scene->addObservable(root);
@@ -289,7 +289,7 @@ void tst_QScene::addChildNode()
// WHEN
for (int i = 0; i < 10; i++) {
- Qt3D::QNode *child = new tst_Node();
+ Qt3DCore::QNode *child = new tst_Node();
if (nodes.isEmpty())
child->setParent(root);
else
@@ -299,7 +299,7 @@ void tst_QScene::addChildNode()
QCoreApplication::processEvents();
// THEN
- Q_FOREACH (Qt3D::QNode *n, nodes) {
+ Q_FOREACH (Qt3DCore::QNode *n, nodes) {
QVERIFY(scene->lookupNode(n->id()) == n);
}
}
@@ -307,17 +307,17 @@ void tst_QScene::addChildNode()
void tst_QScene::removeChildNode()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
- QList<Qt3D::QNode *> nodes;
+ QList<Qt3DCore::QNode *> nodes;
- Qt3D::QNode *root = new tst_Node;
- Qt3D::QNodePrivate::get(root)->setScene(scene);
+ Qt3DCore::QNode *root = new tst_Node;
+ Qt3DCore::QNodePrivate::get(root)->setScene(scene);
scene->addObservable(root);
// WHEN
for (int i = 0; i < 10; i++) {
- Qt3D::QNode *child = new tst_Node;
+ Qt3DCore::QNode *child = new tst_Node;
if (nodes.isEmpty())
child->setParent(root);
else
@@ -327,7 +327,7 @@ void tst_QScene::removeChildNode()
// THEN
while (!nodes.isEmpty()) {
- Qt3D::QNode *lst = nodes.takeLast();
+ Qt3DCore::QNode *lst = nodes.takeLast();
QVERIFY(scene->lookupNode(lst->id()) == lst);
if (lst->parentNode() != Q_NULLPTR) {
lst->setParent(Q_NODE_NULLPTR);
@@ -340,24 +340,24 @@ void tst_QScene::removeChildNode()
void tst_QScene::addEntityForComponent()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
- QList<Qt3D::QEntity *> entities;
- QList<Qt3D::QComponent *> components;
+ QList<Qt3DCore::QEntity *> entities;
+ QList<Qt3DCore::QComponent *> components;
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *entity = new Qt3D::QEntity();
- Qt3D::QComponent *comp = new tst_Component();
+ Qt3DCore::QEntity *entity = new Qt3DCore::QEntity();
+ Qt3DCore::QComponent *comp = new tst_Component();
- Qt3D::QNodePrivate::get(entity)->setScene(scene);
- Qt3D::QNodePrivate::get(comp)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(entity)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(comp)->setScene(scene);
entities << entity;
components << comp;
}
// WHEN
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *e = entities.at(i);
+ Qt3DCore::QEntity *e = entities.at(i);
for (int j = 0; j < 10; j++) {
e->addComponent(components.at(j));
}
@@ -365,7 +365,7 @@ void tst_QScene::addEntityForComponent()
// THEN
for (int i = 0; i < 10; i++) {
- QList<Qt3D::QNodeId> ids = scene->entitiesForComponent(components.at(i)->id());
+ QList<Qt3DCore::QNodeId> ids = scene->entitiesForComponent(components.at(i)->id());
QCOMPARE(ids.count(), 10);
}
}
@@ -373,24 +373,24 @@ void tst_QScene::addEntityForComponent()
void tst_QScene::removeEntityForComponent()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
- QList<Qt3D::QEntity *> entities;
- QList<Qt3D::QComponent *> components;
+ QList<Qt3DCore::QEntity *> entities;
+ QList<Qt3DCore::QComponent *> components;
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *entity = new Qt3D::QEntity();
- Qt3D::QComponent *comp = new tst_Component();
+ Qt3DCore::QEntity *entity = new Qt3DCore::QEntity();
+ Qt3DCore::QComponent *comp = new tst_Component();
- Qt3D::QNodePrivate::get(entity)->setScene(scene);
- Qt3D::QNodePrivate::get(comp)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(entity)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(comp)->setScene(scene);
entities << entity;
components << comp;
}
// WHEN
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *e = entities.at(i);
+ Qt3DCore::QEntity *e = entities.at(i);
for (int j = 0; j < 10; j++) {
e->addComponent(components.at(j));
}
@@ -398,7 +398,7 @@ void tst_QScene::removeEntityForComponent()
// THEN
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *e = entities.at(i);
+ Qt3DCore::QEntity *e = entities.at(i);
for (int j = 0; j < 10; j++) {
e->removeComponent(components.at(j));
QCOMPARE(scene->entitiesForComponent(components.at(j)->id()).count(), 10 - (i + 1));
@@ -409,24 +409,24 @@ void tst_QScene::removeEntityForComponent()
void tst_QScene::hasEntityForComponent()
{
// GIVEN
- Qt3D::QScene *scene = new Qt3D::QScene;
+ Qt3DCore::QScene *scene = new Qt3DCore::QScene;
- QList<Qt3D::QEntity *> entities;
- QList<Qt3D::QComponent *> components;
+ QList<Qt3DCore::QEntity *> entities;
+ QList<Qt3DCore::QComponent *> components;
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *entity = new Qt3D::QEntity();
- Qt3D::QComponent *comp = new tst_Component();
+ Qt3DCore::QEntity *entity = new Qt3DCore::QEntity();
+ Qt3DCore::QComponent *comp = new tst_Component();
- Qt3D::QNodePrivate::get(entity)->setScene(scene);
- Qt3D::QNodePrivate::get(comp)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(entity)->setScene(scene);
+ Qt3DCore::QNodePrivate::get(comp)->setScene(scene);
entities << entity;
components << comp;
}
// WHEN
for (int i = 0; i < 10; i++) {
- Qt3D::QEntity *e = entities.at(i);
+ Qt3DCore::QEntity *e = entities.at(i);
for (int j = 0; j < 10; j++) {
e->addComponent(components.at(j));
}
diff --git a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
index 8c578cd22..3bb1eb8b1 100644
--- a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
+++ b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
@@ -41,7 +41,7 @@
#include <QScopedPointer>
-using namespace Qt3D;
+using namespace Qt3DCore;
class DummyService : public QAbstractServiceProvider
{
diff --git a/tests/auto/core/threadpooler/tst_threadpooler.cpp b/tests/auto/core/threadpooler/tst_threadpooler.cpp
index e3adbeba0..177d7ff16 100644
--- a/tests/auto/core/threadpooler/tst_threadpooler.cpp
+++ b/tests/auto/core/threadpooler/tst_threadpooler.cpp
@@ -61,7 +61,7 @@ public:
~tst_ThreadPooler() {}
private:
- Qt3D::QAspectJobManager *m_jobManager;
+ Qt3DCore::QAspectJobManager *m_jobManager;
private Q_SLOTS:
void init();
@@ -75,7 +75,7 @@ private Q_SLOTS:
void perThreadUniqueCall();
};
-typedef Qt3D::QAspectJobManager JobManager;
+typedef Qt3DCore::QAspectJobManager JobManager;
typedef void (*TestFunction)(QAtomicInt *, int *);
typedef void (*MassFunction)(QVector3D *data);
@@ -86,7 +86,7 @@ void perThreadFunction(void *arg)
// General test AspectJob
-class TestAspectJob : public Qt3D::QAspectJob
+class TestAspectJob : public Qt3DCore::QAspectJob
{
public:
TestAspectJob(TestFunction func, QAtomicInt *counter, int *value);
@@ -121,7 +121,7 @@ void TestAspectJob::run()
// Mass test AspectJob
-class MassAspectJob : public Qt3D::QAspectJob
+class MassAspectJob : public Qt3DCore::QAspectJob
{
public:
MassAspectJob(MassFunction func, QVector3D *data);
@@ -215,7 +215,7 @@ void tst_ThreadPooler::defaultAspectQueue()
// GIVEN
QAtomicInt callCounter;
int value = 0; // Not used in this test
- QVector<QSharedPointer<Qt3D::QAspectJob> > jobList;
+ QVector<QSharedPointer<Qt3DCore::QAspectJob> > jobList;
callCounter.store(0);
const int jobCount = 5;
@@ -241,7 +241,7 @@ void tst_ThreadPooler::doubleAspectQueue()
// GIVEN
QAtomicInt callCounter;
int value = 0; // Not used in this test
- QVector<QSharedPointer<Qt3D::QAspectJob> > jobList;
+ QVector<QSharedPointer<Qt3DCore::QAspectJob> > jobList;
callCounter.store(0);
const int jobCount = 3;
@@ -253,7 +253,7 @@ void tst_ThreadPooler::doubleAspectQueue()
}
m_jobManager->enqueueJobs(jobList);
- QVector<QSharedPointer<Qt3D::QAspectJob> > jobList2;
+ QVector<QSharedPointer<Qt3DCore::QAspectJob> > jobList2;
for (int i = 0; i < jobCount; i++) {
QSharedPointer<TestAspectJob> job(new TestAspectJob(incrementFunctionCallCounter,
&callCounter, &value));
@@ -275,7 +275,7 @@ void tst_ThreadPooler::dependencyAspectQueue()
// GIVEN
QAtomicInt callCounter; // Not used in this test
int value = 2;
- QVector<QSharedPointer<Qt3D::QAspectJob> > jobList;
+ QVector<QSharedPointer<Qt3DCore::QAspectJob> > jobList;
// WHEN
QSharedPointer<TestAspectJob> job1(new TestAspectJob(add2, &callCounter, &value));
@@ -295,7 +295,7 @@ void tst_ThreadPooler::massTest()
{
// GIVEN
const int mass = 600; // 600
- QVector<QSharedPointer<Qt3D::QAspectJob> > jobList;
+ QVector<QSharedPointer<Qt3DCore::QAspectJob> > jobList;
QVector3D data[3 * mass];
// WHEN
diff --git a/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp b/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp
index 37d8ff566..eca8be83c 100644
--- a/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp
+++ b/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp
@@ -48,7 +48,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlcontext.h>
-using namespace Qt3D::Quick;
+using namespace Qt3DCore::Quick;
class tst_quick3dnodeinstantiator: public QQmlDataTest
{
diff --git a/tests/auto/render/attribute/tst_attribute.cpp b/tests/auto/render/attribute/tst_attribute.cpp
index d2058f1b9..e71f18628 100644
--- a/tests/auto/render/attribute/tst_attribute.cpp
+++ b/tests/auto/render/attribute/tst_attribute.cpp
@@ -56,7 +56,7 @@ private Q_SLOTS:
attribute.setCount(427);
attribute.setDivisor(305);
attribute.setName(QStringLiteral("C3"));
- attribute.setDataType(Qt3D::QAbstractAttribute::UnsignedShort);
+ attribute.setDataType(Qt3DCore::QAbstractAttribute::UnsignedShort);
attribute.setDataSize(3);
Qt3DRender::QBuffer buffer(Qt3DRender::QBuffer::IndexBuffer);
@@ -91,7 +91,7 @@ private Q_SLOTS:
QVERIFY(renderAttribute.bufferId().isNull());
QVERIFY(renderAttribute.name().isEmpty());
QCOMPARE(renderAttribute.isDirty(), false);
- QCOMPARE(renderAttribute.dataType(), Qt3D::QAbstractAttribute::Float);
+ QCOMPARE(renderAttribute.dataType(), Qt3DCore::QAbstractAttribute::Float);
QCOMPARE(renderAttribute.dataSize(), 1U);
QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute);
QCOMPARE(renderAttribute.byteOffset(), 0U);
@@ -107,7 +107,7 @@ private Q_SLOTS:
attribute.setCount(427);
attribute.setDivisor(305);
attribute.setName(QStringLiteral("C3"));
- attribute.setDataType(Qt3D::QAbstractAttribute::Double);
+ attribute.setDataType(Qt3DCore::QAbstractAttribute::Double);
attribute.setDataSize(4);
Qt3DRender::QBuffer buffer(Qt3DRender::QBuffer::IndexBuffer);
buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy);
@@ -123,7 +123,7 @@ private Q_SLOTS:
QVERIFY(renderAttribute.bufferId().isNull());
QVERIFY(renderAttribute.name().isEmpty());
QCOMPARE(renderAttribute.isDirty(), false);
- QCOMPARE(renderAttribute.dataType(), Qt3D::QAbstractAttribute::Float);
+ QCOMPARE(renderAttribute.dataType(), Qt3DCore::QAbstractAttribute::Float);
QCOMPARE(renderAttribute.dataSize(), 1U);
QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute);
QCOMPARE(renderAttribute.byteOffset(), 0U);
@@ -140,20 +140,20 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- Qt3D::QScenePropertyChangePtr updateChange(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
- updateChange->setValue(static_cast<int>(Qt3D::QAbstractAttribute::Int));
+ Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
+ updateChange->setValue(static_cast<int>(Qt3DCore::QAbstractAttribute::Int));
updateChange->setPropertyName("dataType");
renderAttribute.sceneChangeEvent(updateChange);
// THEN
- QCOMPARE(renderAttribute.dataType(), Qt3D::QAbstractAttribute::Int);
+ QCOMPARE(renderAttribute.dataType(), Qt3DCore::QAbstractAttribute::Int);
QVERIFY(renderAttribute.isDirty());
renderAttribute.unsetDirty();
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(3);
updateChange->setPropertyName("dataSize");
renderAttribute.sceneChangeEvent(updateChange);
@@ -166,7 +166,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(static_cast<int>(Qt3DRender::QAttribute::IndexAttribute));
updateChange->setPropertyName("attributeType");
renderAttribute.sceneChangeEvent(updateChange);
@@ -179,7 +179,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(1340);
updateChange->setPropertyName("count");
renderAttribute.sceneChangeEvent(updateChange);
@@ -192,7 +192,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QStringLiteral("L88"));
updateChange->setPropertyName("name");
renderAttribute.sceneChangeEvent(updateChange);
@@ -205,7 +205,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(555);
updateChange->setPropertyName("byteOffset");
renderAttribute.sceneChangeEvent(updateChange);
@@ -218,7 +218,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(454);
updateChange->setPropertyName("byteStride");
renderAttribute.sceneChangeEvent(updateChange);
@@ -231,7 +231,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(1450);
updateChange->setPropertyName("divisor");
renderAttribute.sceneChangeEvent(updateChange);
@@ -244,8 +244,8 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeAdded, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
- Qt3D::QNodeId bufferId = Qt3D::QNodeId::createId();
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeAdded, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
+ Qt3DCore::QNodeId bufferId = Qt3DCore::QNodeId::createId();
updateChange->setValue(QVariant::fromValue(bufferId));
updateChange->setPropertyName("buffer");
renderAttribute.sceneChangeEvent(updateChange);
@@ -258,13 +258,13 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeRemoved, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeRemoved, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(bufferId));
updateChange->setPropertyName("buffer");
renderAttribute.sceneChangeEvent(updateChange);
// THEN
- QCOMPARE(renderAttribute.bufferId(), Qt3D::QNodeId());
+ QCOMPARE(renderAttribute.bufferId(), Qt3DCore::QNodeId());
QVERIFY(renderAttribute.isDirty());
renderAttribute.unsetDirty();
diff --git a/tests/auto/render/buffer/tst_buffer.cpp b/tests/auto/render/buffer/tst_buffer.cpp
index ffed836ea..3fb2ad2f3 100644
--- a/tests/auto/render/buffer/tst_buffer.cpp
+++ b/tests/auto/render/buffer/tst_buffer.cpp
@@ -134,7 +134,7 @@ private Q_SLOTS:
QVERIFY(!renderBuffer.isDirty());
// WHEN
- Qt3D::QScenePropertyChangePtr updateChange(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(static_cast<int>(Qt3DRender::QBuffer::IndexBuffer));
updateChange->setPropertyName("type");
renderBuffer.sceneChangeEvent(updateChange);
@@ -147,7 +147,7 @@ private Q_SLOTS:
QVERIFY(!renderBuffer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(static_cast<int>(Qt3DRender::QBuffer::DynamicRead));
updateChange->setPropertyName("usage");
renderBuffer.sceneChangeEvent(updateChange);
@@ -160,7 +160,7 @@ private Q_SLOTS:
QVERIFY(!renderBuffer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QByteArrayLiteral("LS9"));
updateChange->setPropertyName("data");
renderBuffer.sceneChangeEvent(updateChange);
@@ -176,7 +176,7 @@ private Q_SLOTS:
// WHEN
Qt3DRender::QBufferFunctorPtr functor(new TestFunctor(355));
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(functor));
updateChange->setPropertyName("bufferFunctor");
renderBuffer.sceneChangeEvent(updateChange);
diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp
index 19ba1644a..1f3f1d390 100644
--- a/tests/auto/render/entity/tst_entity.cpp
+++ b/tests/auto/render/entity/tst_entity.cpp
@@ -47,10 +47,10 @@
#include <Qt3DRenderer/QShaderData>
#include <Qt3DRenderer/QGeometryRenderer>
-typedef Qt3D::QNodeId (*UuidMethod)(Qt3DRender::Render::Entity *);
-typedef QList<Qt3D::QNodeId> (*UuidListMethod)(Qt3DRender::Render::Entity *);
+typedef Qt3DCore::QNodeId (*UuidMethod)(Qt3DRender::Render::Entity *);
+typedef QList<Qt3DCore::QNodeId> (*UuidListMethod)(Qt3DRender::Render::Entity *);
-using namespace Qt3D;
+using namespace Qt3DCore;
using namespace Qt3DRender;
using namespace Qt3DRender::Render;
@@ -78,7 +78,7 @@ private slots:
QTest::addColumn<QComponent*>("component");
QTest::addColumn<void*>("functionPtr");
- QComponent *component = new Qt3D::QTransform;
+ QComponent *component = new Qt3DCore::QTransform;
QTest::newRow("transform") << component << reinterpret_cast<void*>(transformUuid);
component = new QGeometryRenderer;
diff --git a/tests/auto/render/geometry/tst_geometry.cpp b/tests/auto/render/geometry/tst_geometry.cpp
index dd99978ac..2fa9a4377 100644
--- a/tests/auto/render/geometry/tst_geometry.cpp
+++ b/tests/auto/render/geometry/tst_geometry.cpp
@@ -113,10 +113,10 @@ private Q_SLOTS:
{
// GIVEN
Qt3DRender::Render::Geometry renderGeometry;
- Qt3D::QNodeId geometryId = Qt3D::QNodeId::createId();
+ Qt3DCore::QNodeId geometryId = Qt3DCore::QNodeId::createId();
// WHEN
- Qt3D::QScenePropertyChangePtr updateChange(new Qt3D::QScenePropertyChange(Qt3D::NodeAdded, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeAdded, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(geometryId));
updateChange->setPropertyName("attribute");
renderGeometry.sceneChangeEvent(updateChange);
@@ -129,7 +129,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometry.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeRemoved, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeRemoved, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(geometryId));
updateChange->setPropertyName("attribute");
renderGeometry.sceneChangeEvent(updateChange);
@@ -142,7 +142,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometry.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(3));
updateChange->setPropertyName("verticesPerPatch");
renderGeometry.sceneChangeEvent(updateChange);
diff --git a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
index 13e67cf45..ed49918a7 100644
--- a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
+++ b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
@@ -167,7 +167,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- Qt3D::QScenePropertyChangePtr updateChange(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("instanceCount");
updateChange->setValue(2);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -180,7 +180,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("primitiveCount");
updateChange->setValue(56);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -193,7 +193,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("baseVertex");
updateChange->setValue(65);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -206,7 +206,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("baseInstance");
updateChange->setValue(82);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -219,7 +219,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("restartIndex");
updateChange->setValue(46);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -232,7 +232,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("primitiveRestart");
updateChange->setValue(true);
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -245,7 +245,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("primitiveType");
updateChange->setValue(static_cast<int>(Qt3DRender::QGeometryRenderer::LineLoop));
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -258,7 +258,7 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeUpdated, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setPropertyName("geometryFunctor");
Qt3DRender::QGeometryFunctorPtr functor(new TestFunctor(1450));
updateChange->setValue(QVariant::fromValue(functor));
@@ -272,8 +272,8 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeAdded, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
- Qt3D::QNodeId geometryId = Qt3D::QNodeId::createId();
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeAdded, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
+ Qt3DCore::QNodeId geometryId = Qt3DCore::QNodeId::createId();
updateChange->setValue(QVariant::fromValue(geometryId));
updateChange->setPropertyName("geometry");
renderGeometryRenderer.sceneChangeEvent(updateChange);
@@ -286,13 +286,13 @@ private Q_SLOTS:
QVERIFY(!renderGeometryRenderer.isDirty());
// WHEN
- updateChange.reset(new Qt3D::QScenePropertyChange(Qt3D::NodeRemoved, Qt3D::QSceneChange::Node, Qt3D::QNodeId()));
+ updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeRemoved, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId()));
updateChange->setValue(QVariant::fromValue(geometryId));
updateChange->setPropertyName("geometry");
renderGeometryRenderer.sceneChangeEvent(updateChange);
// THEN
- QCOMPARE(renderGeometryRenderer.geometryId(), Qt3D::QNodeId());
+ QCOMPARE(renderGeometryRenderer.geometryId(), Qt3DCore::QNodeId());
QVERIFY(renderGeometryRenderer.isDirty());
renderGeometryRenderer.unsetDirty();
diff --git a/tests/auto/render/material/tst_material.cpp b/tests/auto/render/material/tst_material.cpp
index 39be14e96..abf74c823 100644
--- a/tests/auto/render/material/tst_material.cpp
+++ b/tests/auto/render/material/tst_material.cpp
@@ -43,7 +43,7 @@
#include <Qt3DCore/QScenePropertyChange>
-using namespace Qt3D;
+using namespace Qt3DCore;
using namespace Qt3DRender;
using namespace Qt3DRender::Render;
diff --git a/tests/auto/render/qattribute/tst_qattribute.cpp b/tests/auto/render/qattribute/tst_qattribute.cpp
index 937e9c200..9383012ba 100644
--- a/tests/auto/render/qattribute/tst_qattribute.cpp
+++ b/tests/auto/render/qattribute/tst_qattribute.cpp
@@ -46,29 +46,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)
{
@@ -77,51 +77,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<Qt3D::QSceneChangePtr>::fromStdVector(e);
+ events += QVector<Qt3DCore::QSceneChangePtr>::fromStdVector(e);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman;
}
- QVector<Qt3D::QSceneChangePtr> events;
+ QVector<Qt3DCore::QSceneChangePtr> 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_QAttribute: public Qt3D::QNode
+class tst_QAttribute: public Qt3DCore::QNode
{
Q_OBJECT
public:
@@ -142,7 +142,7 @@ private Q_SLOTS:
Qt3DRender::QAttribute *customVertex = new Qt3DRender::QAttribute();
Qt3DRender::QBuffer *buffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer);
customVertex->setBuffer(buffer);
- customVertex->setAttributeType(Qt3D::QAbstractAttribute::VertexAttribute);
+ customVertex->setAttributeType(Qt3DCore::QAbstractAttribute::VertexAttribute);
customVertex->setCount(454);
customVertex->setByteStride(427);
customVertex->setByteOffset(305);
@@ -155,7 +155,7 @@ private Q_SLOTS:
Qt3DRender::QAttribute *customIndex = new Qt3DRender::QAttribute();
Qt3DRender::QBuffer *indexBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::IndexBuffer);
customIndex->setBuffer(indexBuffer);
- customIndex->setAttributeType(Qt3D::QAbstractAttribute::IndexAttribute);
+ customIndex->setAttributeType(Qt3DCore::QAbstractAttribute::IndexAttribute);
customIndex->setCount(383);
customIndex->setByteStride(350);
customIndex->setByteOffset(327);
@@ -207,10 +207,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "dataType");
QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DRender::QAttribute::Double));
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -220,10 +220,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "dataSize");
QCOMPARE(change->value().value<uint>(), 4U);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -233,10 +233,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "name");
QCOMPARE(change->value().value<QString>(), QStringLiteral("Duntov"));
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -246,10 +246,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "count");
QCOMPARE(change->value().value<uint>(), 883U);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -259,10 +259,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "byteStride");
QCOMPARE(change->value().value<uint>(), 1340U);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -272,10 +272,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "byteOffset");
QCOMPARE(change->value().value<uint>(), 1584U);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -285,23 +285,23 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "divisor");
QCOMPARE(change->value().value<uint>(), 1450U);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
// WHEN
- attribute->setAttributeType(Qt3D::QAbstractAttribute::IndexAttribute);
+ attribute->setAttributeType(Qt3DCore::QAbstractAttribute::IndexAttribute);
QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "attributeType");
- QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3D::QAbstractAttribute::IndexAttribute));
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DCore::QAbstractAttribute::IndexAttribute));
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -312,10 +312,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "buffer");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), buf.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), buf.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -326,19 +326,19 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 2);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "buffer");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), buf.id());
- QCOMPARE(change->type(), Qt3D::NodeRemoved);
- change = arbiter.events.last().staticCast<Qt3D::QScenePropertyChange>();
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), buf.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeRemoved);
+ change = arbiter.events.last().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "buffer");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), buf2.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), buf2.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
}
protected:
- Qt3D::QNode *doClone() const Q_DECL_OVERRIDE
+ Qt3DCore::QNode *doClone() const Q_DECL_OVERRIDE
{
return Q_NULLPTR;
}
diff --git a/tests/auto/render/qbuffer/tst_qbuffer.cpp b/tests/auto/render/qbuffer/tst_qbuffer.cpp
index 20dcc28ba..0501fd02e 100644
--- a/tests/auto/render/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/render/qbuffer/tst_qbuffer.cpp
@@ -46,29 +46,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)
{
@@ -77,44 +77,44 @@ 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<Qt3D::QSceneChangePtr>::fromStdVector(e);
+ events += QVector<Qt3DCore::QSceneChangePtr>::fromStdVector(e);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman;
}
- QVector<Qt3D::QSceneChangePtr> events;
+ QVector<Qt3DCore::QSceneChangePtr> 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);
}
@@ -147,7 +147,7 @@ private:
// We need to call QNode::clone which is protected
// So we sublcass QNode instead of QObject
-class tst_QBuffer: public Qt3D::QNode
+class tst_QBuffer: public Qt3DCore::QNode
{
Q_OBJECT
public:
@@ -212,7 +212,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "type");
QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DRender::QBuffer::IndexBuffer));
@@ -224,7 +224,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "usage");
QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DRender::QBuffer::DynamicCopy));
@@ -236,7 +236,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "data");
QCOMPARE(change->value().value<QByteArray>(), QByteArrayLiteral("Z28"));
@@ -249,7 +249,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "bufferFunctor");
QCOMPARE(change->value().value<Qt3DRender::QBufferFunctorPtr>(), functor);
@@ -257,7 +257,7 @@ private Q_SLOTS:
}
protected:
- Qt3D::QNode *doClone() const Q_DECL_OVERRIDE
+ Qt3DCore::QNode *doClone() const Q_DECL_OVERRIDE
{
return Q_NULLPTR;
}
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<Qt3D::QSceneChangePtr>::fromStdVector(e);
+ events += QVector<Qt3DCore::QSceneChangePtr>::fromStdVector(e);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman;
}
- QVector<Qt3D::QSceneChangePtr> events;
+ QVector<Qt3DCore::QSceneChangePtr> 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<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "attribute");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), attr.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), 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<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "attribute");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), attr.id());
- QCOMPARE(change->type(), Qt3D::NodeRemoved);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), 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<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
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;
}
diff --git a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
index 291a767d4..186b2e9a8 100644
--- a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
+++ b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
@@ -49,29 +49,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)
{
@@ -80,44 +80,44 @@ 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<Qt3D::QSceneChangePtr>::fromStdVector(e);
+ events += QVector<Qt3DCore::QSceneChangePtr>::fromStdVector(e);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman;
}
- QVector<Qt3D::QSceneChangePtr> events;
+ QVector<Qt3DCore::QSceneChangePtr> 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);
}
@@ -150,7 +150,7 @@ private:
// We need to call QNode::clone which is protected
// So we sublcass QNode instead of QObject
-class tst_QGeometryRenderer: public Qt3D::QNode
+class tst_QGeometryRenderer: public Qt3DCore::QNode
{
Q_OBJECT
public:
@@ -237,10 +237,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "instanceCount");
QCOMPARE(change->value().value<int>(), 256);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -250,10 +250,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "primitiveCount");
QCOMPARE(change->value().value<int>(), 1340);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -263,10 +263,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "baseVertex");
QCOMPARE(change->value().value<int>(), 883);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -276,10 +276,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "baseInstance");
QCOMPARE(change->value().value<int>(), 1200);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -289,10 +289,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "restartIndex");
QCOMPARE(change->value().value<int>(), 65535);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -302,10 +302,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "primitiveRestart");
QCOMPARE(change->value().value<bool>(), true);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -315,10 +315,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "primitiveType");
QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DRender::QGeometryRenderer::Patches));
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -329,10 +329,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "geometryFunctor");
QCOMPARE(change->value().value<Qt3DRender::QGeometryFunctorPtr>(), functor);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -343,10 +343,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "geometry");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), geom.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), geom.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -357,21 +357,21 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 2);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "geometry");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), geom.id());
- QCOMPARE(change->type(), Qt3D::NodeRemoved);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), geom.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeRemoved);
- change = arbiter.events.last().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.last().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "geometry");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), geom2.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), geom2.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
}
protected:
- Qt3D::QNode *doClone() const Q_DECL_OVERRIDE
+ Qt3DCore::QNode *doClone() const Q_DECL_OVERRIDE
{
return Q_NULLPTR;
}
diff --git a/tests/auto/render/qmaterial/tst_qmaterial.cpp b/tests/auto/render/qmaterial/tst_qmaterial.cpp
index 01bd361b1..e719a8ea8 100644
--- a/tests/auto/render/qmaterial/tst_qmaterial.cpp
+++ b/tests/auto/render/qmaterial/tst_qmaterial.cpp
@@ -58,7 +58,7 @@
class TestMaterial : public Qt3DRender::QMaterial
{
public:
- explicit TestMaterial(Qt3D::QNode *parent = 0)
+ explicit TestMaterial(Qt3DCore::QNode *parent = 0)
: Qt3DRender::QMaterial(parent)
, m_effect(new Qt3DRender::QEffect(this))
, m_technique(new Qt3DRender::QTechnique(this))
@@ -84,29 +84,29 @@ public:
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)
{
@@ -115,51 +115,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<Qt3D::QSceneChangePtr>::fromStdVector(e);
+ events += QVector<Qt3DCore::QSceneChangePtr>::fromStdVector(e);
}
- Qt3D::QAbstractPostman *postman() const Q_DECL_FINAL
+ Qt3DCore::QAbstractPostman *postman() const Q_DECL_FINAL
{
return m_postman;
}
- QVector<Qt3D::QSceneChangePtr> events;
+ QVector<Qt3DCore::QSceneChangePtr> 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_QMaterial : public Qt3D::QNode
+class tst_QMaterial : public Qt3DCore::QNode
{
Q_OBJECT
public:
@@ -340,10 +340,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "effect");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), effect.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), effect.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -358,15 +358,15 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter2.events.size(), 2);
- change = arbiter2.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter2.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "effect");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), oldEffect->id());
- QCOMPARE(change->type(), Qt3D::NodeRemoved);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), oldEffect->id());
+ QCOMPARE(change->type(), Qt3DCore::NodeRemoved);
- change = arbiter2.events.last().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter2.events.last().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "effect");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), effect.id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), effect.id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
}
void checkDynamicParametersAddedUpdates()
@@ -382,10 +382,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "parameter");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), param->id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), param->id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -396,10 +396,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "parameter");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), param->id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), param->id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -410,10 +410,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "parameter");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), param->id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), param->id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
@@ -424,10 +424,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "parameter");
- QCOMPARE(change->value().value<Qt3D::QNodeId>(), param->id());
- QCOMPARE(change->type(), Qt3D::NodeAdded);
+ QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), param->id());
+ QCOMPARE(change->type(), Qt3DCore::NodeAdded);
arbiter.events.clear();
}
@@ -445,10 +445,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- Qt3D::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "vertexShaderCode");
QCOMPARE(change->value().value<QByteArray>(), vertexCode);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -459,10 +459,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "fragmentShaderCode");
QCOMPARE(change->value().value<QByteArray>(), fragmentCode);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -473,10 +473,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "geometryShaderCode");
QCOMPARE(change->value().value<QByteArray>(), geometryCode);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -487,10 +487,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "computeShaderCode");
QCOMPARE(change->value().value<QByteArray>(), computeCode);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -501,10 +501,10 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "tessellationControlShaderCode");
QCOMPARE(change->value().value<QByteArray>(), tesselControlCode);
- QCOMPARE(change->type(), Qt3D::NodeUpdated);
+ QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
arbiter.events.clear();
@@ -515,16 +515,16 @@ private Q_SLOTS:
// THEN
QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3D::QScenePropertyChange>();
+ change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
QCOMPARE(change->propertyName(), "tessellationEvaluationShaderCode");
QCOMPARE(change->value().value<QByteArray>(), tesselEvalCode);
- 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;
}
diff --git a/tests/auto/render/raycasting/tst_raycasting.cpp b/tests/auto/render/raycasting/tst_raycasting.cpp
index 994778d4a..2aaa92984 100644
--- a/tests/auto/render/raycasting/tst_raycasting.cpp
+++ b/tests/auto/render/raycasting/tst_raycasting.cpp
@@ -41,7 +41,7 @@
#include <Qt3DCore/qboundingvolumeprovider.h>
#include <Qt3DCore/qray3d.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
using namespace Qt3DRender;
using namespace Qt3DRender::Render;
diff --git a/tests/auto/render/renderpass/tst_renderpass.cpp b/tests/auto/render/renderpass/tst_renderpass.cpp
index df7d066c9..a5b66a534 100644
--- a/tests/auto/render/renderpass/tst_renderpass.cpp
+++ b/tests/auto/render/renderpass/tst_renderpass.cpp
@@ -66,7 +66,7 @@
#include <Qt3DRenderer/private/renderstates_p.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
using namespace Qt3DRender;
using namespace Qt3DRender::Render;
diff --git a/tests/auto/render/renderviews/tst_renderviews.cpp b/tests/auto/render/renderviews/tst_renderviews.cpp
index ca4ecf6cc..31e6f7997 100644
--- a/tests/auto/render/renderviews/tst_renderviews.cpp
+++ b/tests/auto/render/renderviews/tst_renderviews.cpp
@@ -57,7 +57,7 @@ private Q_SLOTS:
void checkRenderViewDoesNotLeak()
{
// GIVEN
- Qt3D::QFrameAllocator allocator(128, 16, 128);
+ Qt3DCore::QFrameAllocator allocator(128, 16, 128);
Qt3DRender::Render::RenderView *rv = allocator.allocate<Qt3DRender::Render::RenderView>();
rv->setAllocator(&allocator);
diff --git a/tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp b/tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp
index b20e0b010..2e1d990c3 100644
--- a/tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp
+++ b/tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/private/qcircularbuffer_p.h>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_QCircularBuffer : public QObject
{
diff --git a/tests/benchmarks/core/qframeallocator/tst_bench_qframeallocator.cpp b/tests/benchmarks/core/qframeallocator/tst_bench_qframeallocator.cpp
index 9e6ab6fa4..3c015ee3a 100644
--- a/tests/benchmarks/core/qframeallocator/tst_bench_qframeallocator.cpp
+++ b/tests/benchmarks/core/qframeallocator/tst_bench_qframeallocator.cpp
@@ -39,7 +39,7 @@
#include <Qt3DCore/QFrameAllocator>
-using namespace Qt3D;
+using namespace Qt3DCore;
class tst_QFrameAllocator : public QObject
{
diff --git a/tests/benchmarks/core/qresourcesmanager/arraypolicy/tst_bench_arraypolicy.cpp b/tests/benchmarks/core/qresourcesmanager/arraypolicy/tst_bench_arraypolicy.cpp
index 3acddc134..29667724a 100644
--- a/tests/benchmarks/core/qresourcesmanager/arraypolicy/tst_bench_arraypolicy.cpp
+++ b/tests/benchmarks/core/qresourcesmanager/arraypolicy/tst_bench_arraypolicy.cpp
@@ -97,42 +97,42 @@ void benchmarkReleaseResources()
void tst_ArrayPolicy::benchmarkDynamicAllocateSmallResources()
{
- benchmarkAllocateResources<Qt3D::ArrayAllocatingPolicy<SmallType, 16>, SmallType>();
+ benchmarkAllocateResources<Qt3DCore::ArrayAllocatingPolicy<SmallType, 16>, SmallType>();
}
void tst_ArrayPolicy::benchmarkDynamicReleaseSmallResources()
{
- benchmarkReleaseResources<Qt3D::ArrayAllocatingPolicy<SmallType, 16>, SmallType>();
+ benchmarkReleaseResources<Qt3DCore::ArrayAllocatingPolicy<SmallType, 16>, SmallType>();
}
void tst_ArrayPolicy::benchmarkDynamicAllocateBigResources()
{
- benchmarkAllocateResources<Qt3D::ArrayAllocatingPolicy<BigType, 16>, BigType>();
+ benchmarkAllocateResources<Qt3DCore::ArrayAllocatingPolicy<BigType, 16>, BigType>();
}
void tst_ArrayPolicy::benchmarkDynamicReleaseBigResources()
{
- benchmarkReleaseResources<Qt3D::ArrayAllocatingPolicy<BigType, 16>, BigType>();
+ benchmarkReleaseResources<Qt3DCore::ArrayAllocatingPolicy<BigType, 16>, BigType>();
}
void tst_ArrayPolicy::benchmarkPreallocatedAllocateSmallResources()
{
- benchmarkAllocateResources<Qt3D::ArrayPreallocationPolicy<SmallType, 16>, SmallType>();
+ benchmarkAllocateResources<Qt3DCore::ArrayPreallocationPolicy<SmallType, 16>, SmallType>();
}
void tst_ArrayPolicy::benchmarkPreallocatedReleaseSmallResources()
{
- benchmarkReleaseResources<Qt3D::ArrayPreallocationPolicy<SmallType, 16>, SmallType>();
+ benchmarkReleaseResources<Qt3DCore::ArrayPreallocationPolicy<SmallType, 16>, SmallType>();
}
void tst_ArrayPolicy::benchmarkPreallocatedAllocateBigResources()
{
- benchmarkAllocateResources<Qt3D::ArrayPreallocationPolicy<BigType, 16>, BigType>();
+ benchmarkAllocateResources<Qt3DCore::ArrayPreallocationPolicy<BigType, 16>, BigType>();
}
void tst_ArrayPolicy::benchmarkPreallocatedReleaseBigResources()
{
- benchmarkReleaseResources<Qt3D::ArrayPreallocationPolicy<BigType, 16>, BigType>();
+ benchmarkReleaseResources<Qt3DCore::ArrayPreallocationPolicy<BigType, 16>, BigType>();
}
QTEST_APPLESS_MAIN(tst_ArrayPolicy)
diff --git a/tests/benchmarks/core/qresourcesmanager/qresourcesmanager/tst_bench_qresourcesmanager.cpp b/tests/benchmarks/core/qresourcesmanager/qresourcesmanager/tst_bench_qresourcesmanager.cpp
index d14adc486..221c43e74 100644
--- a/tests/benchmarks/core/qresourcesmanager/qresourcesmanager/tst_bench_qresourcesmanager.cpp
+++ b/tests/benchmarks/core/qresourcesmanager/qresourcesmanager/tst_bench_qresourcesmanager.cpp
@@ -77,7 +77,7 @@ public:
template<typename Resource>
void benchmarkAllocateResources()
{
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
volatile Resource *c;
QBENCHMARK_ONCE {
@@ -91,9 +91,9 @@ void benchmarkAllocateResources()
template<typename Resource>
void benchmarkAccessResources()
{
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
const int max = (1 << 16) - 1;
- QVector<Qt3D::QHandle<Resource> > handles(max);
+ QVector<Qt3DCore::QHandle<Resource> > handles(max);
for (int i = 0; i < max; i++)
handles[i] = manager.acquire();
@@ -107,9 +107,9 @@ void benchmarkAccessResources()
template<typename Resource>
void benchmarkRandomAccessResource() {
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
const int max = (1 << 16) - 1;
- QVector<Qt3D::QHandle<Resource> > handles(max);
+ QVector<Qt3DCore::QHandle<Resource> > handles(max);
for (int i = 0; i < max; i++)
handles[i] = manager.acquire();
@@ -126,7 +126,7 @@ void benchmarkRandomAccessResource() {
template<typename Resource>
void benchmarkLookupResources()
{
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
const int max = (1 << 16) - 1;
for (int i = 0; i < max; i++)
manager.getOrCreateResource(i);
@@ -142,7 +142,7 @@ void benchmarkLookupResources()
template<typename Resource>
void benchmarkRandomLookupResources()
{
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
const int max = (1 << 16) - 1;
QVector<int> resourcesIndices(max);
for (int i = 0; i < max; i++) {
@@ -162,9 +162,9 @@ void benchmarkRandomLookupResources()
template<typename Resource>
void benchmarkReleaseResources()
{
- Qt3D::QResourceManager<Resource, int, 16> manager;
+ Qt3DCore::QResourceManager<Resource, int, 16> manager;
const int max = (1 << 16) - 1;
- QVector<Qt3D::QHandle<Resource> > handles(max);
+ QVector<Qt3DCore::QHandle<Resource> > handles(max);
for (int i = 0; i < max; i++)
handles[i] = manager.acquire();