summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/picking/tst_picking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/picking/tst_picking.cpp')
-rw-r--r--tests/auto/render/picking/tst_picking.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/render/picking/tst_picking.cpp b/tests/auto/render/picking/tst_picking.cpp
index f89463776..9fe15c334 100644
--- a/tests/auto/render/picking/tst_picking.cpp
+++ b/tests/auto/render/picking/tst_picking.cpp
@@ -71,18 +71,15 @@ public:
, clickedCalled(0)
{
mesh->setRadius(radius);
- QSphereGeometry *g = static_cast<QSphereGeometry *>(mesh->geometry());
+ QSphereGeometry *g = static_cast<QSphereGeometry *>(mesh->view()->geometry());
QAttribute *positionAttr = static_cast<QAttribute *>(g->attributes().first());
Qt3DCore::QBuffer *vertexBuffer = static_cast<Qt3DCore::QBuffer *>(positionAttr->buffer());
Q_UNUSED(vertexBuffer);
transform->setTranslation(position);
- auto renderer = new Qt3DRender::QGeometryRenderer;
- renderer->setView(mesh);
-
addComponent(picker);
- addComponent(renderer);
+ addComponent(mesh);
addComponent(transform);
QObject::connect(picker, &QObjectPicker::pressed, this, &PickableEntity::onPressed);