diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-12 15:17:32 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-12 15:17:32 +0100 |
commit | eb6e9229c8cecd4b573039fafd644a16912e31f6 (patch) | |
tree | 7d4b65e49c5e92d2998e0066d4f0dc71ee906e64 | |
parent | c67c99d11fc012404f2fbd8fa3b27fac675ce9f2 (diff) | |
download | sink-eb6e9229c8cecd4b573039fafd644a16912e31f6.tar.gz sink-eb6e9229c8cecd4b573039fafd644a16912e31f6.zip |
Adapt to kasync changes
-rw-r--r-- | common/changereplay.cpp | 2 | ||||
-rw-r--r-- | common/commandprocessor.cpp | 4 | ||||
-rw-r--r-- | common/resourceaccess.cpp | 2 | ||||
-rw-r--r-- | formattest.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/common/changereplay.cpp b/common/changereplay.cpp index 13ed49e..5d5afbb 100644 --- a/common/changereplay.cpp +++ b/common/changereplay.cpp | |||
@@ -92,7 +92,7 @@ KAsync::Job<void> ChangeReplay::replayNextRevision() | |||
92 | *topRevision = DataStore::maxRevision(mMainStoreTransaction); | 92 | *topRevision = DataStore::maxRevision(mMainStoreTransaction); |
93 | SinkTrace() << "Changereplay from " << *lastReplayedRevision << " to " << *topRevision; | 93 | SinkTrace() << "Changereplay from " << *lastReplayedRevision << " to " << *topRevision; |
94 | }) | 94 | }) |
95 | .then(KAsync::dowhile( | 95 | .then(KAsync::doWhile( |
96 | [this, lastReplayedRevision, topRevision]() -> KAsync::Job<KAsync::ControlFlowFlag> { | 96 | [this, lastReplayedRevision, topRevision]() -> KAsync::Job<KAsync::ControlFlowFlag> { |
97 | if (*lastReplayedRevision >= *topRevision) { | 97 | if (*lastReplayedRevision >= *topRevision) { |
98 | return KAsync::value(KAsync::Break); | 98 | return KAsync::value(KAsync::Break); |
diff --git a/common/commandprocessor.cpp b/common/commandprocessor.cpp index 20fcf3a..efcd077 100644 --- a/common/commandprocessor.cpp +++ b/common/commandprocessor.cpp | |||
@@ -227,7 +227,7 @@ KAsync::Job<void> CommandProcessor::processQueue(MessageQueue *queue) | |||
227 | { | 227 | { |
228 | auto time = QSharedPointer<QTime>::create(); | 228 | auto time = QSharedPointer<QTime>::create(); |
229 | return KAsync::syncStart<void>([this]() { mPipeline->startTransaction(); }) | 229 | return KAsync::syncStart<void>([this]() { mPipeline->startTransaction(); }) |
230 | .then(KAsync::dowhile( | 230 | .then(KAsync::doWhile( |
231 | [this, queue, time]() -> KAsync::Job<KAsync::ControlFlowFlag> { | 231 | [this, queue, time]() -> KAsync::Job<KAsync::ControlFlowFlag> { |
232 | return queue->dequeueBatch(sBatchSize, | 232 | return queue->dequeueBatch(sBatchSize, |
233 | [this, time](const QByteArray &data) -> KAsync::Job<void> { | 233 | [this, time](const QByteArray &data) -> KAsync::Job<void> { |
@@ -265,7 +265,7 @@ KAsync::Job<void> CommandProcessor::processPipeline() | |||
265 | return KAsync::null<void>(); | 265 | return KAsync::null<void>(); |
266 | } | 266 | } |
267 | auto it = QSharedPointer<QListIterator<MessageQueue *>>::create(mCommandQueues); | 267 | auto it = QSharedPointer<QListIterator<MessageQueue *>>::create(mCommandQueues); |
268 | return KAsync::dowhile( | 268 | return KAsync::doWhile( |
269 | [it, this]() { | 269 | [it, this]() { |
270 | auto time = QSharedPointer<QTime>::create(); | 270 | auto time = QSharedPointer<QTime>::create(); |
271 | time->start(); | 271 | time->start(); |
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 81715e5..22d4cdb 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -160,7 +160,7 @@ KAsync::Job<void> ResourceAccess::Private::tryToConnect() | |||
160 | // We may have a socket from the last connection leftover | 160 | // We may have a socket from the last connection leftover |
161 | socket.reset(); | 161 | socket.reset(); |
162 | auto counter = QSharedPointer<int>::create(0); | 162 | auto counter = QSharedPointer<int>::create(0); |
163 | return KAsync::dowhile( | 163 | return KAsync::doWhile( |
164 | [this, counter]() { | 164 | [this, counter]() { |
165 | SinkTrace() << "Loop"; | 165 | SinkTrace() << "Loop"; |
166 | return connectToServer(resourceInstanceIdentifier) | 166 | return connectToServer(resourceInstanceIdentifier) |
diff --git a/formattest.cpp b/formattest.cpp index 14eb550..5e65b4a 100644 --- a/formattest.cpp +++ b/formattest.cpp | |||
@@ -173,7 +173,7 @@ KAsync::Job<void> processPipeline() | |||
173 | 173 | ||
174 | //Go through all message queues | 174 | //Go through all message queues |
175 | auto it = QSharedPointer<QListIterator<MessageQueue*> >::create(mCommandQueues); | 175 | auto it = QSharedPointer<QListIterator<MessageQueue*> >::create(mCommandQueues); |
176 | return KAsync::dowhile( | 176 | return KAsync::doWhile( |
177 | [it]() { return it->hasNext(); }, | 177 | [it]() { return it->hasNext(); }, |
178 | [it, this](KAsync::Future<void> &future) { | 178 | [it, this](KAsync::Future<void> &future) { |
179 | auto queue = it->next(); | 179 | auto queue = it->next(); |