summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/render
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2015-12-15 11:43:24 +0100
committerKevin Ottens <kevin.ottens@kdab.com>2015-12-17 09:17:29 +0000
commitd190e6b92ac01358f243078ad1727c98eaa22c3d (patch)
tree614f1a4c320954f8b6facd93652f9e72b6b06038 /tests/benchmarks/render
parent0be8ddf4012cea9e9f4b8918270f494b2c3597a3 (diff)
Remove QAbstractAspect::setRootEntity
We switch to a more resilient private virtual instead. Change-Id: I90710c7873571ca0a40f7cc939282344b20a59f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/benchmarks/render')
-rw-r--r--tests/benchmarks/render/jobs/tst_bench_jobs.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/benchmarks/render/jobs/tst_bench_jobs.cpp b/tests/benchmarks/render/jobs/tst_bench_jobs.cpp
index 4ce49f1ad..5acf7b1ca 100644
--- a/tests/benchmarks/render/jobs/tst_bench_jobs.cpp
+++ b/tests/benchmarks/render/jobs/tst_bench_jobs.cpp
@@ -129,7 +129,7 @@ public:
return d_func()->m_renderer->renderBinJobs();
}
- void setRootEntity(Qt3DCore::QEntity *root)
+ void onRootEntityChanged(Qt3DCore::QEntity *root)
{
if (!m_window) {
Qt3DCore::QNodeVisitor visitor;
@@ -137,8 +137,6 @@ public:
static_cast<Qt3DRender::Render::Renderer *>(d_func()->m_renderer)->m_renderSceneRoot =
d_func()->m_renderer->nodeManagers()
->lookupResource<Qt3DRender::Render::Entity, Qt3DRender::Render::EntityManager>(root->id());
- } else {
- QRenderAspect::setRootEntity(root);
}
}
@@ -247,7 +245,7 @@ private Q_SLOTS:
QFETCH(Qt3DCore::QEntity*, rootEntity);
TestAspect aspect;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
// WHEN
QVector<Qt3DCore::QAspectJobPtr> jobs = aspect.worldTransformJob();
@@ -270,7 +268,7 @@ private Q_SLOTS:
QFETCH(Qt3DCore::QEntity*, rootEntity);
TestAspect aspect;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
// WHEN
QVector<Qt3DCore::QAspectJobPtr> jobs = aspect.updateBoundingJob();
@@ -293,7 +291,7 @@ private Q_SLOTS:
QFETCH(Qt3DCore::QEntity*, rootEntity);
TestAspect aspect;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
// WHEN
QVector<Qt3DCore::QAspectJobPtr> jobs = aspect.calculateBoundingVolumeJob();
@@ -316,7 +314,7 @@ private Q_SLOTS:
QFETCH(Qt3DCore::QEntity*, rootEntity);
TestAspect aspect;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
// WHEN
QVector<Qt3DCore::QAspectJobPtr> jobs = aspect.framePreparationJob();
@@ -339,7 +337,7 @@ private Q_SLOTS:
QFETCH(Qt3DCore::QEntity*, rootEntity);
TestAspect aspect;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
// WHEN
QVector<Qt3DCore::QAspectJobPtr> jobs = aspect.frameCleanupJob();
@@ -367,7 +365,7 @@ private Q_SLOTS:
qDebug() << 1;
- aspect.setRootEntity(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
+ aspect.registerAspect(qobject_cast<Qt3DCore::QEntity *>(rootEntity));
qDebug() << 2;
// WHEN