diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-08-05 12:49:11 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-08-06 13:43:24 +0000 |
commit | 9b6ca58d5d49acdff284e5e4853b338bb60572e8 (patch) | |
tree | 17c4fc30c4eb8b488eb022a34a8b0e47f652df23 /src/input | |
parent | 5a5a40f9f442f2176cfd08a44f3f005a1e8ce779 (diff) |
Add onStartup() and onShutdown() virtuals to QAbstractAspect
Gives aspects a chance to do work just prior to and just after the
main loop in QAspectManager.
Specifically the shutdown functionality is required for the upcoming
logic aspect to ensure a clean shutdown.
Added the onStartup() method for symmetry.
Change-Id: If5f32d62629543cdceb2e6e3ff6383747acb7c99
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/qinputaspect.cpp | 8 | ||||
-rw-r--r-- | src/input/qinputaspect.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/input/qinputaspect.cpp b/src/input/qinputaspect.cpp index 84638239b..41baa9846 100644 --- a/src/input/qinputaspect.cpp +++ b/src/input/qinputaspect.cpp @@ -140,6 +140,14 @@ void QInputAspect::onInitialize(const QVariantMap &data) d->m_inputHandler->setEventSource(object); } +void QInputAspect::onStartup() +{ +} + +void QInputAspect::onShutdown() +{ +} + void QInputAspect::onCleanup() { Q_D(QInputAspect); diff --git a/src/input/qinputaspect.h b/src/input/qinputaspect.h index 2392da1cb..6c126a036 100644 --- a/src/input/qinputaspect.h +++ b/src/input/qinputaspect.h @@ -68,6 +68,8 @@ public: private: void setRootEntity(QEntity *rootObject) Q_DECL_OVERRIDE; void onInitialize(const QVariantMap &data) Q_DECL_OVERRIDE; + void onStartup() Q_DECL_OVERRIDE; + void onShutdown() Q_DECL_OVERRIDE; void onCleanup() Q_DECL_OVERRIDE; void visitNode(QNode *node); |