diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-07-03 17:08:08 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-07-12 19:14:00 +0000 |
commit | 2b3f68d588c15830ebbacf55823b2af049d76b47 (patch) | |
tree | d4bbc39f0c19226f0adc67c4ad2131a4e460c170 /src/core/qchangearbiter_p.h | |
parent | 6fcaef11f89994cfc9f117a07cb64b0e8959da2c (diff) |
QChangeArbiter/QPostMan: batch frontend changes
- Updated unit tests
- Added QAbstractPostman and QAbstractArbiter as they are more than
QObserverInterfaces but still need to be easily testable.
Change-Id: I0fc2ce48031eecc9bf893798650ef68e9d7d8bb7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/qchangearbiter_p.h')
-rw-r--r-- | src/core/qchangearbiter_p.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/core/qchangearbiter_p.h b/src/core/qchangearbiter_p.h index 33b23e0b0..97cdbe9c8 100644 --- a/src/core/qchangearbiter_p.h +++ b/src/core/qchangearbiter_p.h @@ -48,6 +48,7 @@ #include <Qt3DCore/qnodeid.h> #include <Qt3DCore/qscenechange.h> #include <Qt3DCore/private/qlockableobserverinterface_p.h> +#include <Qt3DCore/private/qt3dcore_global_p.h> QT_BEGIN_NAMESPACE @@ -57,12 +58,19 @@ class QNode; class QObservableInterface; class QAbstractAspectJobManager; class QSceneObserverInterface; -class QPostman; +class QAbstractPostman; class QScene; -class QT3DCORESHARED_EXPORT QChangeArbiter + +class QT3DCORE_PRIVATE_EXPORT QAbstractArbiter : public QLockableObserverInterface +{ +public: + virtual QAbstractPostman *postman() const = 0; +}; + +class QT3DCORE_PRIVATE_EXPORT QChangeArbiter Q_DECL_FINAL : public QObject - , public QLockableObserverInterface + , public QAbstractArbiter { Q_OBJECT public: @@ -86,10 +94,10 @@ public: void sceneChangeEventWithLock(const QSceneChangePtr &e) Q_DECL_OVERRIDE; // QLockableObserverInterface impl void sceneChangeEventWithLock(const QSceneChangeList &e) Q_DECL_OVERRIDE; // QLockableObserverInterface impl - Q_INVOKABLE void setPostman(Qt3D::QObserverInterface *postman); + Q_INVOKABLE void setPostman(Qt3D::QAbstractPostman *postman); Q_INVOKABLE void setScene(Qt3D::QScene *scene); - QObserverInterface *postman() const; + QAbstractPostman *postman() const Q_DECL_FINAL; QScene *scene() const; static void createUnmanagedThreadLocalChangeQueue(void *changeArbiter); @@ -133,7 +141,7 @@ private: // be accessed from the aspect thread during the syncChanges() phase. QList<QChangeQueue *> m_changeQueues; QList<QChangeQueue *> m_lockingChangeQueues; - QObserverInterface *m_postman; + QAbstractPostman *m_postman; QScene *m_scene; }; |