diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-07-30 13:07:24 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-07-30 14:02:21 +0000 |
commit | cf8a527e918efb080907d313e7259e78ac7ca3bd (patch) | |
tree | bc35f343a47f70a8dffaa82e874b39846d878797 /tests | |
parent | 94d51b51ddaabb9dfc98cf61edfff8dd2a9e74fe (diff) |
Remove a now-unneeded resolveReferences call
There is now a resolveReferences call in the scenemanager whenever
building a scene.
Also, add a note in the autotests since there it is still important to
have an explicit call.
Change-Id: I26d720411c6980c65eb60bbe680cbb10ce8c9cbe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/uipparser/tst_q3dsuipparser.cpp | 4 | ||||
-rw-r--r-- | tests/manual/qt3dsexplorer/manualpresentationtest.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/uipparser/tst_q3dsuipparser.cpp b/tests/auto/uipparser/tst_q3dsuipparser.cpp index 22e8bec..8f67b97 100644 --- a/tests/auto/uipparser/tst_q3dsuipparser.cpp +++ b/tests/auto/uipparser/tst_q3dsuipparser.cpp @@ -809,6 +809,10 @@ void tst_Q3DSUipParser::primitiveMeshes() // test changing using the "dynamic" setter cylinder->applyPropertyChanges({ Q3DSPropertyChange::fromVariant("sourcepath", QLatin1String("#Sphere")) }); + // For objects that are attached (or will be attached) to a real scene the + // resolveReferences call is not necessary since scenemanager will do this + // internally. Here however we need to invoke it explicitly in order to see + // the change right away. cylinder->resolveReferences(*pres.data()); QCOMPARE(cylinder->mesh(), sphere->mesh()); } diff --git a/tests/manual/qt3dsexplorer/manualpresentationtest.cpp b/tests/manual/qt3dsexplorer/manualpresentationtest.cpp index c1b9985..241b926 100644 --- a/tests/manual/qt3dsexplorer/manualpresentationtest.cpp +++ b/tests/manual/qt3dsexplorer/manualpresentationtest.cpp @@ -68,7 +68,6 @@ Q3DSUipPresentation *ManualPresentationTest::build() Q3DSModelNode *model1 = mainPres->newObject<Q3DSModelNode>("model1"); // A model needs a mesh model1->setMesh(QLatin1String("#Cube")); // let's use a built-in primitive - model1->resolveReferences(*mainPres); // resolve the mesh path to actual data layer1->appendChildNode(model1); Q3DSDefaultMaterial *mat1 = mainPres->newObject<Q3DSDefaultMaterial>("mat1"); |