diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-22 14:27:37 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-22 14:27:37 +0100 |
commit | c799105ca6b4107fa19de9845247f1f3322ea6ef (patch) | |
tree | 9a9da831861b5094936f8b62431fb5e20ce759f5 /common/changereplay.cpp | |
parent | c6af4d6ed59235d8fec52aeddfcd9a65607139ff (diff) | |
download | sink-c799105ca6b4107fa19de9845247f1f3322ea6ef.tar.gz sink-c799105ca6b4107fa19de9845247f1f3322ea6ef.zip |
Ensure we always process the full queue and that flushing works.
Diffstat (limited to 'common/changereplay.cpp')
-rw-r--r-- | common/changereplay.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/changereplay.cpp b/common/changereplay.cpp index a0796eb..13ed49e 100644 --- a/common/changereplay.cpp +++ b/common/changereplay.cpp | |||
@@ -154,9 +154,12 @@ KAsync::Job<void> ChangeReplay::replayNextRevision() | |||
154 | .syncThen<void>([this, lastReplayedRevision]() { | 154 | .syncThen<void>([this, lastReplayedRevision]() { |
155 | recordReplayedRevision(*lastReplayedRevision); | 155 | recordReplayedRevision(*lastReplayedRevision); |
156 | mMainStoreTransaction.abort(); | 156 | mMainStoreTransaction.abort(); |
157 | if (allChangesReplayed()) { | 157 | if (ChangeReplay::allChangesReplayed()) { |
158 | mReplayInProgress = false; | 158 | mReplayInProgress = false; |
159 | emit changesReplayed(); | 159 | //In case we have a derived implementation |
160 | if (allChangesReplayed()) { | ||
161 | emit changesReplayed(); | ||
162 | } | ||
160 | } else { | 163 | } else { |
161 | QTimer::singleShot(0, [this]() { | 164 | QTimer::singleShot(0, [this]() { |
162 | mReplayInProgress = false; | 165 | mReplayInProgress = false; |