summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/qgeometry
Commit message (Collapse)AuthorAgeFilesLines
* Tests: move TestArbiter into core commonPaul Lemire2016-11-181-0/+1
| | | | | | | | As it doesn't make sense to have it in render when mutliple submodules need that for their tests Change-Id: I853ca15a87051e4f63bfd7a24dae5e82014589b8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_QGeometry: add tests for attribute bookkeepingPaul Lemire2016-06-291-0/+34
| | | | | Change-Id: I9a975e3714a149a9656a093dd16348522b777b0c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid crash in QML app shutdown and actually send events in C++ appSean Harmer2016-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic was such that in a C++ application the QNode::setParent() function would bail out early in a C++ application when called from the destructor of its parent object. This is because by the time the child is being deleted the parent is in QObjectPrivate::deleteChildren and therefore the QNode part of the object has already been destroyed. This led to the cast in the parentNode() == parent to fail, thereby exiting the functio early and never getting into QNodePrivate::_q_setParentHelper(). In the case of a QML application, the parent has a dynamic metaobject set by the QML engine. This resulted in the cast in QNode::setParent() succeeding and we called into _q_setParentHelper(). The logic in here resulted in a crash when called from a destructor because the child had already been removed from its parent's list of children. Thus when we called QObjectPrivate::setParentHelper(), this function ended up with an index of -1 for the child in its child list (i.e. not found) and it then tried to index into the children list with this index and we then crashed. The solution in this change is to not do the full logic in QNode::setParent() and _q_setParentHelper(). Rather, we simply remove the subtree at this node from the scene and we send node destruction changes to the backend. With this we avoid the crash of QML application shutdowns and we also make sure to correctly send the node destruction changes even in the case of a C++ Qt 3D application. The backend does not yet get an opportunity to process these final changes. This will be addressed in a follow up commit. As a result of these changes many unit tests began crashing. This is because the QNode dtor is now actually doing some work, rather than bailing out of that work early when the parent is no longer a QNode. This work involves mutating the QScene object which in the unit tests did not live longer than the QNode's to which it was associated with. The unit tests have been adjusted to ensure that the arbiter and scene objects remain alive longer than the QNodes they are being used to test. Task-number: QTBUG-42353 Change-Id: I197870f48fca30656bd85c4c51346d93403fba08 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Rename QNodeRemovedPropertyChange -> QPropertyNodeRemovedChangeSean Harmer2016-05-101-2/+2
| | | | | | Task-number: QTBUG-51494 Change-Id: I1c7f1c680bc18c6201b790e96dc4023564837122 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QNodeAddedPropertyChange -> QPropertyNodeAddedChangeSean Harmer2016-05-101-2/+2
| | | | | | Task-number: QTBUG-51494 Change-Id: I7f59bad66eb086e2249c580be2fd9f4bad159eb3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-101-1/+1
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename NodeAdded/NodeRemoved ChangeFlagsSean Harmer2016-05-101-2/+2
| | | | | | | | | | | | | | | | These are not just for adding/removing QNodes. They are more general in purpose and are used for adding/removing values to/from collection based properties e.g. QVector<MyValue>. The addition/removal of QNode pointers (which we translate to QNodeIds) is just the most common case. If Q_PROPERTY/QObject gains support for properties of collections and the typical operations on them, then we will be able to catch and handle most uses of these change types in QNodePrivate just like we do for setting a Q_PROPERTY. Task-number: QTBUG-51494 Change-Id: I707de1647554a61accf81dc79bfe58b289dbff7b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-5/+5
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Strip out cloning subsystemSean Harmer2016-04-291-25/+17
| | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QGeometry use new added/removed change typesSean Harmer2016-04-271-8/+12
| | | | | Change-Id: I2af76675187f9dc16aa466a95f5e6fb0d0b03a09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNode: make cleanup a private slotPaul Lemire2016-04-231-5/+0
| | | | | | | | | | QT3D_CLONEABLE now implements a default dtor that calls _q_ cleanup QT3D_CLONEABLE_CUSTOM_DTOR is used for classes that really need to implement their own dtor but they need to invoke _q_cleanup manually Change-Id: I2937a3b9edeb5a763749f0044360d78ab4461a5e Task-number: QTBUG-51464 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QScenePropertyChange -> QNodePropertyChangeSean Harmer2016-04-211-2/+2
| | | | | | | Trying to unify naming of change types. Change-Id: I0bfca0b7ba5adeaaa6145f75ddb41731f76adc09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QBoundingVolumeSpecifierMike Krus2016-03-221-17/+3
| | | | | | | | Replaced with boundingVolumePositionAttribute Task-number: QTBUG-51495 Change-Id: Ic404ce6e53ebb23d792b01a414dbd8cc21e2dbc7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGeometry: move verticesPerPath to QGeometryRendererPaul Lemire2016-03-051-16/+0
| | | | | Change-Id: I6f86164eff9f0709f400c4404cf1d104e7632be5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unify license header usageAntti Kokko2016-01-261-17/+9
| | | | | | | | Updated license headers to use new GPL-EXCEPT header instead of LGPL3 one (in those files which will be under GPL 3 with exceptions) Change-Id: I930c6234bfe720d38c596bbc3d1f39be75a7328b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update test for QGeometry with a QBoundingVolumeSpecifierPaul Lemire2015-11-161-2/+20
| | | | | | Change-Id: Iff43fe206cb262da5f1aca2700c0577ce1502995 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-192-4/+4
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unit Tests: use the commons TestArbiter/PostmanPaul Lemire2015-10-142-77/+3
| | | | | Change-Id: Ic61ab8b30414297a4f65ee0695e91bfa578af5a6 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-131-28/+28
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Render aspect into the Qt3DRender namespaceSean Harmer2015-10-131-15/+15
| | | | | | | Updated examples and tests accordingly. Change-Id: I8848a88472de2302aa072fa11f21ea934672b7e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QGeometry: add verticesPerPath propertyPaul Lemire2015-08-111-0/+16
| | | | | Change-Id: I62989438ce1713d5b10174804346862310138bff Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractAttribute: Type abstracted with an enumPaul Lemire2015-08-071-5/+5
| | | | | | | Also added a dataSize property to know the number of components per vertice (1 - 4) Change-Id: Iaa7cee2a53958ed2ec2f603f3ffc7971c027991d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QGeometry unit testsPaul Lemire2015-08-072-0/+250
Change-Id: I400ff797244d7e3493b145ab63f99b6e806f907b Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>