diff options
-rw-r--r-- | common/genericresource.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp index e2b0122..112ce64 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp | |||
@@ -222,7 +222,9 @@ KAsync::Job<void> GenericResource::processAllMessages() | |||
222 | //TODO JOBAPI: A helper that waits for n events and then continues? | 222 | //TODO JOBAPI: A helper that waits for n events and then continues? |
223 | return KAsync::start<void>([this](KAsync::Future<void> &f) { | 223 | return KAsync::start<void>([this](KAsync::Future<void> &f) { |
224 | if (mCommitQueueTimer.isActive()) { | 224 | if (mCommitQueueTimer.isActive()) { |
225 | QObject::connect(&mCommitQueueTimer, &QTimer::timeout, [&f]() { | 225 | auto context = new QObject; |
226 | QObject::connect(&mCommitQueueTimer, &QTimer::timeout, context, [&f, context]() { | ||
227 | delete context; | ||
226 | f.setFinished(); | 228 | f.setFinished(); |
227 | }); | 229 | }); |
228 | } else { | 230 | } else { |