summaryrefslogtreecommitdiffstats
path: root/src/core/aspects
Commit message (Collapse)AuthorAgeFilesLines
* QAspectManager: avoid a temporary listAurélien Brooke2024-01-221-8/+5
| | | | | Change-Id: Ic3f9115a9d55038b3d8901b894d662164e8a79bc Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Readability: use empty() instead of size() to check for emptinessAurélien Brooke2024-01-131-2/+2
| | | | | Change-Id: Icd578efe70a9bdaf5ffbd5c8e9500c370d655cc0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Fix \fn template arguments for Qt 3DTopi Reinio2023-11-271-1/+1
| | | | | | | | | Upcoming changes to QDoc require accurate definition for template arguments in \fn commands. Task-number: QTBUG-118080 Change-Id: I297dd65dba574b3e3effa06dcdac7f7613afb8bb Reviewed-by: Luca Di Sera <luca.disera@qt.io>
* AspectCommandDebugger::trim: use memmove instead of memcpyPaul Lemire2023-10-021-3/+3
| | | | | | | | | | Since the ranges to copy overlap, memcpy isn't safe to use, memmove is. Task-number: QTBUG-117065 Pick-to: 6.6 6.5 Change-Id: Ib4197f35c919b24ce229def0f5e154221d22357f Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
* Build with QT_NO_CONTEXTLESS_CONNECTAhmad Samir2023-07-221-3/+3
| | | | | | | | | | | This disables the 3-arg QObject::connect() overload: QObject::connect(sender, signal, functor) For details see: https://lists.qt-project.org/pipermail/development/2023-July/044141.html Change-Id: If62d07f687d9ea86995ea813add49216ccaf15cc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove qmake build filesMike Krus2023-03-171-20/+0
| | | | | | | | Except in examples Pick-to: 6.5 Change-Id: I31b06ddfc79f14dde3369518a76d57606daf939f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove qsizetype to int narrowing conversionsAurélien Brooke2022-12-211-3/+3
| | | | | | | | Change the variable type from int to qsizetype when receiving qsizetype values. Change-Id: I2adf71e1d2f26b1452fee28890c0f68300f54224 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix incorrect usages of std::make_move_iteratorAurélien Brooke2022-12-191-3/+2
| | | | | | | | | | | | | | In several places, std::make_move_iterator was used to move from a const vector, which is not possible and fell back to copy. Use the existing Qt3DCore::moveAtEnd utility to ensure a move operation is actually happening. * When readability permits, pass directly a return value as second parameter; * Otherwise, std::move from a mutable vector. Change-Id: I56c8925bbdeab95257d0a7fa89cffcda53fd6451 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-203-11/+11
| | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I1b3c7c4058726c55199fd8ba74b6d6890ad8dd93 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Qt3DCore: includemocsMike Krus2022-06-224-0/+10
| | | | | | | Task-number: QTBUG-103286 Pick-to: 6.3 6.2 5.15 Change-Id: Ifca1713c5e2f3582788a8f0537621e166bda4492 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use SPDX license identifiersLucie Gérard2022-06-2212-456/+24
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I8105424281eed871037fa6c463871ca8829876b5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix missing includesVille Voutilainen2022-05-171-0/+1
| | | | | | | | | | | These popped up on a developer build of the newest dev branch. I don't know whether there's been header refactoring churn or whether the devs and CI use pch, but I certainly couldn't build without these fixes, on Linux with GCC 11. Pick-to: 6.3 6.2 Change-Id: Ic3529a33f4bc5c339b22c523d0be811ffb977c06 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Replace all implicit container move and clear by an explicit functionPaul Lemire2021-02-241-1/+2
| | | | | | | | | | | | | We are likely relying on the fact that most implementations of containers clear the moved from container when calling std::move. That being said this behavior is likely implementation/platform dependent and could bite us at some later point. This patch introduces a moveAndClear function that does the move and an explicit clear and use it in all appropriate places. Change-Id: I8081d09907e17e287741fa952269af22df4dcf5f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Replace old Q_DECL statements with modern C++Allan Sandfeld Jensen2020-11-023-4/+4
| | | | | | | | Since we have long depended on C++11 now, all of these can go. Change-Id: I8808af2cd5ce192864c636b521dadd7de189563b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make QAbstractFrontEndNodeManager privateMike Krus2020-10-274-8/+21
| | | | | Change-Id: Ic12bc80a00e887a959c6cb27e72be0422d71b254 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove undefined methodMike Krus2020-08-271-1/+0
| | | | | Change-Id: Ia9eb943a559acefd7353b84fc80b0a53ee938800 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: apply Scene3D changes from 5.15Paul Lemire2020-08-261-1/+2
| | | | | | | Should fix potential crash on shutdown Change-Id: If1b2180532d23ad8187b25014d0d3a51a7eb1ebe Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use QList instead of QVector in implementation and docsJarek Kobus2020-07-096-26/+26
| | | | | | | | | Fix some const correctness. Use list-initialization. Task-number: QTBUG-84469 Change-Id: I9c56742581f48f89a3b02e4121fae414117c7a25 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use QList instead of QVectorJarek Kobus2020-07-072-11/+11
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic726ce85e01190dbc64426388fd454c54ae3c3e3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAspectJob: switch to using std::vectorPaul Lemire2020-07-023-7/+9
| | | | | Change-Id: I1314bd4d37ad17442ebd6287f571e41bc5d25490 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-242-3/+3
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I2e126d0be8efa0aa89c4a91a681b549f38c8cec4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Clean input event handlingMike Krus2020-06-231-1/+0
| | | | | | | | | - Clean up header dependencies - Remove EventSourceSettingHelper as threading is no longer an issue - Remove some locks which are no longer needed Change-Id: I071173d3b4c681f5420bd7a1f4cb13f80a9c9b2f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix buildGiuseppe D'Angelo2020-06-031-1/+1
| | | | | | | | moc in Qt 6 needs the type to be fully declared and not just forward declared. Change-Id: I4af9b067cbb245e4358ff77653c63e6c79274240 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Introduce QCoreAspectMike Krus2020-04-092-0/+10
| | | | | | | Does nothing for now Change-Id: I94310a893c3be430aa3d36948c07e0d50efe6c8a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Introduce abstract API to lookup front end nodesMike Krus2020-04-072-6/+8
| | | | | | | Useful later to write simpler tests Change-Id: I164b0e46eed5f341629895d7f7b0c3af75999fbd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Track dirty state on front end nodesMike Krus2020-04-072-0/+11
| | | | | | | Nothing clears the state yet, will be up to the core aspect to do that. Change-Id: Ia3a5297a4b837b1d67545bd29ddce56666c520f3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add support for aspects depending on other aspectsMike Krus2020-03-026-4/+33
| | | | | | | | | | 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-026-1/+46
| | | | | | | | | | | | | | 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>
* Fix build without feature.animationTasuku Suzuki2020-02-281-0/+2
| | | | | Change-Id: I98968db8699a60b07192a2eeed19e1e25bd4660c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add QBackendNode::syncFromFrontEnd to public APIMike Krus2020-02-271-5/+5
| | | | | | | | | Removes need to per aspect overrides of QAbstractAspectPrivate::syncDirtyFrontEndNode which was required in Qt5 to preserve BC. Change-Id: Ib3b05af1c3ded1c985d35e4dec0fe203cdc907cb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 5.15 into devMike Krus2020-02-173-1/+14
|\ | | | | | | Change-Id: I2777f6a40b9029ef5569a84e04f9e18a914504e7
| * Add ability to dump job graph to dot fileMike Krus2020-02-143-1/+14
| | | | | | | | | | | | | | | | | | 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-118-262/+45
|/ | | | | | | Mostly old messaging API Change-Id: I17eb2206b2ede56d2f7d36375d5e711d6149019f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Clean up tracing codeMike Krus2020-01-274-17/+12
| | | | | | | | | | - Removed some old optional timing code. - Separated jobsDone into 2 parts since, on single threaded rendering mode (ie macOS), the render aspect blocks until the next vsync which confuses tracing Change-Id: Icb641e3f8079da2cb9af0416b0f7c4dc4dd36c3c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 5.14 into 5.15Mike Krus2020-01-252-3/+54
|\ | | | | | | | | | | | | | | | | | | * 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-132-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Expose number of jobs is last updateMike Krus2019-12-172-2/+5
| | | | | | | | | | | | | | Useful for tracking amount of work done Change-Id: I1d6e0394c35fffc4b33991373e4d16e4651987c7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Move AspectCommandDebugger to system service, activate command executerMike Krus2019-12-175-54/+16
| | | | | | | | | | | | | | | | | | | | | | - 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>
* | Use jobsDone to sync render capture back to frontendMike Krus2019-12-132-3/+3
| | | | | | | | | | | | | | | | | | | | | | Removes the jobs who's only purpose was to send a message to the frontend. Now added a jobsDone() call to render which is called from main thread when jobs are completed, so it's safe to sync data to frontend. Added a task trace for the backend to front end synching. Change-Id: I587462bea353c5d5a0065b542adcacef4dedb05f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Implement getting list of aspects from system information classMike Krus2019-12-133-13/+10
| | | | | | | | | | Change-Id: I999dfbb5c139ff8af2b1de9255f76ac132ae2dc0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make tracing a runtime optionMike Krus2019-12-131-50/+41
| | | | | | | | | | | | | | | | | | | | | | - 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>
* | Make NodeRelationshipChange struct privateMike Krus2019-12-064-19/+5
| | | | | | | | | | | | | | Was private in 5.14, should remain so in 5.15 Change-Id: I74231d349e60f498d8ffb4ff39cc1e95fa3f0567 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Revert "Fix post FF API changes"Mike Krus2019-12-034-22/+36
|/ | | | | | | 84766ed9098f10efc53e4e43a75eef38fce7fbf6 Change-Id: I12341ec1b7bc68a7586c6671aa7b8f21caed17e0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Disable threaded rendering macOS 10.14 and laterMike Krus2019-11-142-0/+6
| | | | | | | | | | | | | | | | Making context current from background thread crashes on Catalina. In this case, we disable threaded rendering. This implies changes in the order in which initialization and rendering happens. We can't just rely on rendering type since Scene3D is not threaded but has it's own initialization logic. Ideally 5.15 should introduce proper API since currently manually setting a QWindow based app to use Synchronous rendering will hang at initialization time. Task-number: QTBUG-80049 Change-Id: Ic346a44d8e0add8232a16129e878423f4cf2f4f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix frame advance serviceMike Krus2019-10-281-1/+5
| | | | | | | | | | | | | | on macOS, blocking the main thread waiting for current frame to finish can lead to events flooding the event queue. In particular, moving the mouse over the window causes the QBasicTimer used by the uniform timer that drives (qtquick) animations to no longer fire. Use tryAcquire to get the resources, waiting a short while to avoid busy main thread. Task-number: QTBUG-79379 Change-Id: I930aa8ad7d5a15600d7ac7af93e6e72321457089 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix post FF API changesMike Krus2019-10-224-36/+22
| | | | | Change-Id: I347f6df41c0a4f2295831e78248669b4a2d6b5ef Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix Coverity warningsMike Krus2019-10-212-1/+1
| | | | | Change-Id: I00c875b48d838170fddf0b92f0ac5592828c6f0f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QScene2D to use direct syncMike Krus2019-10-141-1/+1
| | | | | | Change-Id: Iba2fa5ce9d295706fc50f904cac68f00bd8f02b7 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove use of node/components added/removed messagesMike Krus2019-10-044-0/+118
| | | | | | | | | | | | | 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>
* Add accessor to retrieve frontend node from an idMike Krus2019-10-022-0/+22
| | | | | | | Useful later to sync backend changes back to the frontend. Change-Id: I874d140fc97462b8e186b66c882647db26d5678e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>