Commit 04852859 authored by Krzysztof Nowicki's avatar Krzysztof Nowicki Committed by Laurent Montel
Browse files

Only remove a subjob if it was successfull



Otherwise KCompositeJob::slotResult() will not have a chance to
terminate the whole job if one of the subjobs fail. This would in
turn result in hanging EwsFetchItemsJobs and a broken Akonadi state
machine.
Signed-off-by: Krzysztof Nowicki's avatarKrzysztof Nowicki <krissn@op.pl>
parent 4bb1d6ab
......@@ -424,12 +424,12 @@ void EwsFetchItemsJob::compareItemLists()
void EwsFetchItemsJob::itemDetailFetchDone(KJob *job)
{
removeSubjob(job);
const auto detailJob = qobject_cast<EwsFetchItemDetailJob *>(job);
if (detailJob) {
qCWarningNC(EWSRES_LOG) << QStringLiteral("itemDetailFetchDone: ") << detailJob->error();
if (!detailJob->error()) {
removeSubjob(job);
const auto changedItems = detailJob->changedItems();
for (const auto &item : changedItems) {
if (item.isValid()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment