summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/qgeometry
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2016-03-22 19:59:55 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-03-22 20:50:08 +0000
commit971cfa74e6475c52a969ea58040b11d410d8716f (patch)
tree531d318cb13ef261185eb71d631e8f6fe2a7518f /tests/auto/render/qgeometry
parent873a96eafbc80d0b12ffc83cda936e39e2f4936f (diff)
Remove QBoundingVolumeSpecifier
Replaced with boundingVolumePositionAttribute Task-number: QTBUG-51495 Change-Id: Ic404ce6e53ebb23d792b01a414dbd8cc21e2dbc7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/auto/render/qgeometry')
-rw-r--r--tests/auto/render/qgeometry/tst_qgeometry.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/auto/render/qgeometry/tst_qgeometry.cpp b/tests/auto/render/qgeometry/tst_qgeometry.cpp
index c23d14d18..f4a638ea2 100644
--- a/tests/auto/render/qgeometry/tst_qgeometry.cpp
+++ b/tests/auto/render/qgeometry/tst_qgeometry.cpp
@@ -33,7 +33,6 @@
#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qboundingvolumespecifier.h>
#include "testpostmanarbiter.h"
@@ -62,7 +61,7 @@ private Q_SLOTS:
Qt3DRender::QAttribute *attribute = new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), Qt3DRender::QAttribute::Float, 4, 454);
geometry1->addAttribute(attribute);
geometry1->addAttribute(new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), Qt3DRender::QAttribute::Float, 4, 555));
- geometry1->boundingVolumeSpecifier()->setPositionAttribute(attribute);
+ geometry1->setBoundingVolumePositionAttribute(attribute);
QTest::newRow("2 attributes") << geometry1 << 2;
@@ -90,8 +89,8 @@ private Q_SLOTS:
QCOMPARE(geometry->id(), clone->id());
QCOMPARE(attributeCount, geometry->attributes().count());
QCOMPARE(attributeCount, clone->attributes().count());
- if (geometry->boundingVolumeSpecifier()->positionAttribute())
- QCOMPARE(geometry->boundingVolumeSpecifier()->positionAttribute()->id(), clone->boundingVolumeSpecifier()->positionAttribute()->id());
+ if (geometry->boundingVolumePositionAttribute())
+ QCOMPARE(geometry->boundingVolumePositionAttribute()->id(), clone->boundingVolumePositionAttribute()->id());
for (int i = 0; i < attributeCount; ++i) {
Qt3DRender::QAttribute *originalAttribute = static_cast<Qt3DRender::QAttribute *>(geometry->attributes()[i]);
@@ -147,19 +146,6 @@ private Q_SLOTS:
QCOMPARE(change->type(), Qt3DCore::NodeRemoved);
arbiter.events.clear();
-
- // WHEN
- geometry->boundingVolumeSpecifier()->setPositionAttribute(&attr);
- QCoreApplication::processEvents();
-
- // THEN
- QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>();
- QCOMPARE(change->propertyName(), "boundingVolumeSpecifierPositionAttribute");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), attr.id());
- QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
-
- arbiter.events.clear();
}
protected: