diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-02-27 09:59:07 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-03-02 06:42:37 +0000 |
commit | faca25dd611b92d81463cfda935073f73adeeb39 (patch) | |
tree | b20b37f4a83e7d9ba37298d2dd9d9b8ae00b6305 /src/core/aspects/qabstractaspect.cpp | |
parent | 5edb1cfb4322048797b8e8eea8ac531862331d95 (diff) |
Add public API for working with jobs
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>
Diffstat (limited to 'src/core/aspects/qabstractaspect.cpp')
-rw-r--r-- | src/core/aspects/qabstractaspect.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 1e88e6216..f01124e19 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -393,6 +393,28 @@ void QAbstractAspect::onEngineShutdown() { } +/*! + * Called in the main thread once all the jobs have been executed. + * + * \note This is called after QAspectJob::postFrame is called on every jobs. + * + * \sa QAspectJob::postFrame + */ +void QAbstractAspect::jobsDone() +{ + Q_D(QAbstractAspect); + d->jobsDone(); +} + +/*! + * Called in the main thread when the frame processing is complete. + */ +void QAbstractAspect::frameDone() +{ + Q_D(QAbstractAspect); + d->frameDone(); +} + void QAbstractAspect::scheduleSingleShotJob(const Qt3DCore::QAspectJobPtr &job) { Q_D(QAbstractAspect); |