summaryrefslogtreecommitdiffstats
path: root/src/core/qchangearbiter.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-07-03 15:14:19 +0200
committerSean Harmer <sean.harmer@kdab.com>2015-07-04 11:25:33 +0000
commita92ca8a4e74c805a2e870e3d184405c15c69f4a8 (patch)
tree365bcee464a99832ab1a3cc3997b395524835caf /src/core/qchangearbiter.cpp
parente5aea8e17dc6562933587d543b6a6aee5e6236af (diff)
QChangeArbiter/QLockableObserverInterface: sceneChangeEventWithLock overload
takes an std::vector<QSceneChangePtr> to soon allow efficient submission of change batches. Note: there's no real need for a similar overload of sceneChangeEvent yet. Change-Id: Id76eb77a0b6b2f1308a72d85d65948a3fb411951 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/qchangearbiter.cpp')
-rw-r--r--src/core/qchangearbiter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp
index 886b74036..6d84eebfd 100644
--- a/src/core/qchangearbiter.cpp
+++ b/src/core/qchangearbiter.cpp
@@ -260,6 +260,13 @@ void QChangeArbiter::sceneChangeEventWithLock(const QSceneChangePtr &e)
sceneChangeEvent(e);
}
+void QChangeArbiter::sceneChangeEventWithLock(const QSceneChangeList &e)
+{
+ QMutexLocker locker(&m_mutex);
+ QChangeQueue *localChangeQueue = m_tlsChangeQueue.localData();
+ localChangeQueue->insert(localChangeQueue->end(), e.begin(), e.end());
+}
+
// Either we have the postman or we could make the QChangeArbiter agnostic to the postman
// but that would require adding it to every QObserverList in m_aspectObservations.
void QChangeArbiter::setPostman(QObserverInterface *postman)