diff options
author | Jim Albamont <jim.albamont@kdab.com> | 2019-09-17 17:04:43 -0700 |
---|---|---|
committer | Jim Albamont <jim.albamont@kdab.com> | 2019-09-18 10:04:32 -0700 |
commit | 1cdf47f02e2b32da4ac82561f625716642d2933a (patch) | |
tree | 2be35e656bab5191ca643d326864eef8b55eddc3 /src/core/aspects/qaspectmanager_p.h | |
parent | 63717986fdd41e53f021eeed9c6a7d10062af530 (diff) |
Process pending nodes needing _q_postConstructorInit at start of frame
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>
Diffstat (limited to 'src/core/aspects/qaspectmanager_p.h')
-rw-r--r-- | src/core/aspects/qaspectmanager_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/aspects/qaspectmanager_p.h b/src/core/aspects/qaspectmanager_p.h index b39ad1f89..38ddbc55d 100644 --- a/src/core/aspects/qaspectmanager_p.h +++ b/src/core/aspects/qaspectmanager_p.h @@ -74,6 +74,7 @@ class QChangeArbiter; class QAbstractAspect; class QAbstractAspectJobManager; class QServiceLocator; +class NodePostConstructorInit; struct NodeTreeChange; class Q_3DCORE_PRIVATE_EXPORT QAspectManager : public QObject @@ -105,6 +106,7 @@ public: QAbstractAspectJobManager *jobManager() const; QChangeArbiter *changeArbiter() const; QServiceLocator *serviceLocator() const; + void setPostConstructorInit(NodePostConstructorInit *postConstructorInit); private: bool event(QEvent *event) override; @@ -121,6 +123,8 @@ private: bool m_simulationLoopRunning; QAspectEngine::RunMode m_driveMode; QVector<NodeTreeChange> m_nodeTreeChanges; + NodePostConstructorInit* m_postConstructorInit; + }; } // namespace Qt3DCore |