summaryrefslogtreecommitdiffstats
path: root/tests/auto/core
Commit message (Collapse)AuthorAgeFilesLines
* Introduce QCoreAspectMike Krus2020-04-091-2/+4
| | | | | | | Does nothing for now Change-Id: I94310a893c3be430aa3d36948c07e0d50efe6c8a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add support for aspects depending on other aspectsMike Krus2020-03-021-5/+25
| | | | | | | | | | Aspect can define a list of aspect names it depends one. When it is registered, these will be automatically created if they don't exist already. Change-Id: I12852751a6646ad09d09a6958d059ccf2b2e324d Caveat: this only works with named aspects. Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add public API for working with jobsMike Krus2020-03-021-6/+9
| | | | | | | | | | | | | | Existing jobs used private API for doing work after jobs were run or controlling if running was required or not. Make this public so that new jobs in custom aspects don't need to use private API. Unfortunately, this requires changing the signature of one public method that mistakenly was using a private class as a parameter. Change-Id: Ie8315a0f98ec48f84650163b4ac713e7e6845a92 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 5.15 into devMike Krus2020-02-171-1/+1
|\ | | | | | | Change-Id: I2777f6a40b9029ef5569a84e04f9e18a914504e7
| * Add ability to dump job graph to dot fileMike Krus2020-02-141-1/+1
| | | | | | | | | | | | | | | | | | Can be triggered from the overlay API and using sending a "dump jobs" command to the aspect engine. Gets saved in the current working directory. Change-Id: I19fc94a1215187c1d7eb9d1f3b13b968939cc917 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove deprecated classes and functionsPaul Lemire2020-02-1119-2272/+297
| | | | | | | | | | | | | | Mostly old messaging API Change-Id: I17eb2206b2ede56d2f7d36375d5e711d6149019f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 5.15 into devMike Krus2020-02-0718-369/+367
|\| | | | | | | Change-Id: I731aa986e1cc45b3af920db1a23f256927beecf7
| * tst_qresoucemanager: add test to make sure cleanup is workingPaul Lemire2020-02-061-0/+21
| | | | | | | | | | Change-Id: I5006778b74fee6d030f65deaba86bb38a7a0a86b Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Unit tests for qschedulerPaul Lemire2020-01-283-1/+210
| | | | | | | | | | Change-Id: Iaa26160736bc6b92ecf0be767cb289d776cf46ad Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Merge remote-tracking branch 5.14 into 5.15Mike Krus2020-01-251-0/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/5.14: Fix usage of C++14 features Use animation rather than event to drive simulation Fix for incorrect QML property names in GeometryRenderer doc Add viewAll support for orthographic projection mode Change-Id: I397bdee907389a6f5cabb8390a805fa9a89ed4ca
| | * Use animation rather than event to drive simulationMike Krus2020-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using events can be problematic as they contribute to flooding of the event queue leading to issues with running animations. So we now use an actual animation which runs in a loop and triggers every 1ms (rendering still vsync locked though). If animation have not been enabled for the qt build, we fall back to using events as before. Tests were changes since frame progress is no longer driven by events, so processEvents does not trigger a frame update. Change-Id: I89b11862ef432dffae0c3dfb140eedd61754697e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Fix deprecation handlingMike Krus2020-01-149-221/+36
| | | | | | | | | | | | | | | | | | Change-Id: If981333f7a3d78028d4f08c59867453d4192b955 Task-number: QTBUG-81058 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Move AspectCommandDebugger to system service, activate command executerMike Krus2019-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Always compile in AspectCommandDebugger and CommandExecuter - AspectCommandDebugger start when QT3D_COMMAND_SERVER_ENABLED is set - System information service becomes entry point for commands from the debugger - Added commands to enable and disable tracing Change-Id: Ic0d7fe72fa8a118a43ca348ca4284595a71827a4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-141-0/+4
| |\| | | | | | | | | | Change-Id: I5a5b1d497430afdd0fe11933832a2477a7efbe30
| | * Skip shouldNotCrashInNormalStartupShutdownSequenceUlf Hermann2019-12-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is flaky on macOS 10.12 and 10.13. As it usually times out, a blacklist entry won't help. Blacklisting merely ignores the result, but doesn't prevent the test watchdog from killing the process. Task-number: QTBUG-80660 Change-Id: I6aec979e7437700e4e6596241f135622d99fd3be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Implement getting list of aspects from system information classMike Krus2019-12-132-4/+4
| | | | | | | | | | | | | | | Change-Id: I999dfbb5c139ff8af2b1de9255f76ac132ae2dc0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Make tracing a runtime optionMike Krus2019-12-132-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved most of the code QSystemInformationService (private class for now) - Tracing can be enabled by setting QT3D_TRACE_ENABLED or calling QSystemInformationService::setTraceEnabled(bool) - Introduced QTaskLogger class to easy logging (RAII) Change-Id: I2a3e08e4371fcee3e9ef3cf575725f13f57d1a94 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Deprecate message APIMike Krus2019-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Deprecates the message classes and the public APIs to send/receive them. (deprecates the constructors as deprecating classes breaks syncqt) Change-Id: I4908f15c3c5f1d63969a0f2e11f6ecb22e2e3748 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-071-1/+1
| |\| | | | | | | | | | Change-Id: I6682d27cc7c4f54158fa6813b1de6edce77bea33
| | * Shader: record standard uniform at loading timePaul Lemire2019-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Avoids having to check for each uniform (for each frame, each geometry) whether it is a standard uniform or a user defined one. Change-Id: I76cff7869aacc1343a9acf991f8035b8118581ed Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Fix compile warningsMike Krus2019-12-032-13/+13
| | | | | | | | | | | | | | | Change-Id: Idb253d8cb42809ae21cfbbda70d6b6c75891070f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Revert "Fix post FF API changes"Mike Krus2019-12-032-8/+5
| |/ | | | | | | | | | | | | 84766ed9098f10efc53e4e43a75eef38fce7fbf6 Change-Id: I12341ec1b7bc68a7586c6671aa7b8f21caed17e0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * QNode::updateNode: ensure postConstructorInit of node is calledPaul Lemire2019-10-281-29/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QNode subclass is created doing Subclass(parent) with parent != nullptr QNodePrivate::_q_postContrustorInit is called through a queued invocation due to the fact that the QNode ctor is called before the subclass ctor is (and we need the class to be fully constructed to do proper initialization). When adding a QNode subclass created as described above, and immediately referencing it as a property of another QNode, we can end up in cases where the backend gets aware of the node being referenced in the relationship and tries to create its backend. Unfortunately due to the queued invocation of _q_postConstructorInit, the frontend node has yet to be fully initialized, resulting in the creation of the backend node to assert/crash. Therefore, when updateNode is called (whenever a subnode is referenced in a relationship) we now ensure that postConstructorInit gets (or has already been) called. Change-Id: Iea6e0b5a59c676f5db2946bec2f8c345accc32b0 Task-number: QTBUG-79350 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Fix post FF API changesMike Krus2019-10-222-5/+8
| | | | | | | | | | Change-Id: I347f6df41c0a4f2295831e78248669b4a2d6b5ef Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Remove remaining messaging code in QSkeletonLoaderMike Krus2019-10-221-65/+0
| | | | | | | | | | | | | | And matching unit tests Change-Id: Iff0b13b2ad9ff07d08c767f4b20de2a1685a5570 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Remove old code from animation classes & update testsMike Krus2019-10-211-36/+0
| | | | | | | | | | Change-Id: Ic91a4f168172d6f34d858488e6fc170e8ed875f9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update dependenciesMike Krus2020-02-071-7/+7
| | | | | | | | | | | | | | | | | | | | - Fix build for change in QML private syntax and relocation of OpenGL headers - Fix some deprecation warnings - Update include paths - Update module dependencies Change-Id: I03e65a46b18a9dea872fe2250d5b4fe28128f4e8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Fix build and warningsMike Krus2020-01-288-3069/+2
|/ | | | | | | | | | - QOpenGLDebugLogger moved to separate module - QList == QVector - Removed circular buffer and frame allocator - Various warnings Change-Id: I7caf55779c34d66c9d075e5191872c0a2ac6ddce Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove use of node/components added/removed messagesMike Krus2019-10-043-100/+51
| | | | | | | | | | | | | Introduce mechanism to notify backend nodes of changes in relationship between nodes. If a component is added or removed from an entity, or if a node is added or removed from a property of another node, then just rely on the node being marked as dirty when syncing takes place. For nodes that do not support syncing, messages are delivered as before but allocated on the stack rather than the heap. Change-Id: I06affac77e42a9998d9c7f44e231c7724c52b320 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Clean up includesMike Krus2019-10-016-6/+1
| | | | | | | | | Remove include statements for classes that are no longer used. Makes it easier to find remaining use cases that need addressed before complete removal in Qt 6. Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Process pending nodes needing _q_postConstructorInit at start of frameJim Albamont2019-09-181-14/+47
| | | | | | | | | | | | | | NodePostConstructorInit::processNodes and QAspectManager::processFrame are both triggered by the event loop which means the frame can happen before the processNodes call. We want to ensure processNodes is called first so those pending nodes can be created during the processFrame call otherwise they will get deferred until the next frame. Created a test to show this and removed the now unnecessary double calls to processEvents in several other tests. Change-Id: I7a3f7b34be2858b4acdb9275804b458f9366ec67 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix test for parenting QEntity to QNodeJim Albamont2019-09-171-5/+9
| | | | | | | | | | | The purpose of this test is to make sure when parenting a QEntity to a QNode, the backend entity will receive notification and be able to correctly resolve it's parent entity. Update the test to check that the QEntity node is marked dirty in the arbiter and has the correct parent and parent entity. Change-Id: I8f2c8aa1c8b5b6bbabd956bbfdef36fafcd05f8d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix/improve several node testsJim Albamont2019-09-171-7/+218
| | | | | | | | | | | | | | | | | | Changing the backend to remove syncing removed creation and destruction events and the tests were updated to reflect that. The key part of several tests actually involve this creation and destruction information, such as testing to ensure all parent backend nodes are created before their children. Created a TestAspect that allows capturing the creation/destruction of backend nodes and updated the many of the tests to check this information These tests will be important when refactoring to remove the entity hierarchy rebuilding and some other cleanup. Change-Id: I1e6a7ce01df2c711b266bccc6fe3dcb31431e3f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QEntity to use direct sync modeMike Krus2019-09-173-10/+20
| | | | | | Change-Id: I9fa6e67607baa66250789b8bf618f30bd45aad98 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use direct access to remove backend nodesPaul Lemire2019-09-162-207/+32
| | | | | | | | | - Stop using messages - Remove QSceneObserverInterface - Ensure backend node creation/destruction is done at the right time Change-Id: I470825af344ab65bf05e93fc149b61d1b9eefc96 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix crash in tst_QShaderProgramJim Albamont2019-09-131-0/+3
| | | | | | | | | | | | | | | We install the TestArbiter on "this" in one test and the TestArbiter is destroyed at the end of that test. In a second test we again install a TestArbiter on "this". The call to QNode::setArbiter tries to access the desroyed arbiter (m_changeArbiter->removeDirtyFrontEndNode(q)) resulting in a crash. Need to set a null arbiter on "this" to properly clean up. Also fix a few other incorrect uses that weren't crashing. Change-Id: Iee2ea8210df971f934e2f188748803c8745c8278 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-112-0/+98
|\ | | | | | | Change-Id: I4e73060c1941773efcc568f010f5b073ebb10d4a
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-242-0/+98
| |\ | | | | | | | | | Change-Id: I7d7274866129a3c8a3ed3788680a46368120d20d
| | * Matrix_SSE/Matrix_AVX2: fix mapVectorPaul Lemire2019-08-202-0/+98
| | | | | | | | | | | | | | | | | | Change-Id: I4584d2c879a72eccbaf273d0e84b3b6f6bb55295 Task-number: QTBUG-77675 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Use sync method when initializing new backend nodesMike Krus2019-08-294-242/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the node type supports syncing, use that rather than the creation message. The message is still needed since that is passed to the instantiation functor (none of qt3d's classes appear to use anything but the node id, but can't be sure no other classes do, and can't add other virtual method without breaking BC). Change-Id: Id99f448070b8722a7809b968798772c9eb3c8397 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'qt-gerrit/wip/refactor' into HEADPaul Lemire2019-08-2811-188/+191
|\ \ \ | | | | | | | | | | | | Change-Id: Id73bbecd18edaf46ba481aa018e837a336860223
| * | | Do direct notification of backend nodeswip/refactorMike Krus2019-08-2811-188/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since aspect manager is now on main thread, we can directly update backend nodes safely. Track nodes which have changed properties and notify the backend nodes as part of the frame loop. This avoid allocating and delivering many change messages. To follow: - implement on all nodes - look at backend to frontend syncing - figure out what to do with non property messages (components added/removed, commands, ...) Change-Id: Ia0c442b0528e728c4324d168200bae021bc29266 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | | QTransform: add worldMatrix propertyPaul Lemire2019-08-131-0/+49
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will make it more convenient to retrieve the world transform of a given QEntity as well as monitor it for changes without having to traverse the parent hierarchy of QEntity/QTransform [ChangeLog] Add worldMatrix property on QTransform Change-Id: Ie9ffb70c03b365850ed08693df2746701ca9a1fb Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-181-1/+10
|\| | | | | | | | | | | Change-Id: I942a33e63084b346702577e28c70f2111e40a4d5
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-151-1/+10
| |\| | | | | | | | | | Change-Id: I903f92a7b910eee165a2dd708a2d5fb25192ab14
| | * Fix removal of components when they are destroyedMike Krus2019-05-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatic removal of components when they are destroyed is based on connecting to the destroyed() signal. This however means that by the time removeComponent() is called, the pointer is no longer a valid QComponent (just a QNode). While accessing member data of derived classes such as nodeId is fine, emitting signals from derived class does nothing, and in some cases asserts. Fix this by: - doing the QComponent clean up from it's destructor - implementing a separate method on QEntity to simply clear the now partly invalid pointer from the list. Change-Id: Id7632ee2ceaff6548c44c7a43ae40a0372febde9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-121-3/+4
| | | | | | | | | | | | | | | Change-Id: Ifecc9e20f6e2a4adf6811b38c8afdc830ecd91cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Replace QLatin1Literal with QLatin1StringGiuseppe D'Angelo2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QLatin1Literal is an undocumented and deprecated typedef for QLatin1String, just use the original. Change-Id: Id6a813ed5c0a457f003dbd118b64f77d9d82cb13 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devPaul Lemire2019-06-031-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/renderer/renderer.cpp tests/auto/render/textures/tst_textures.cpp Change-Id: I4da0eafe7ddd4dd822c3dcb5f5fa826653a335b4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-291-2/+4
| |\| | | | | | | | | | Change-Id: I9e9214906c5cda56d0bcc98678c77be69189699d