Commit da65f9f8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Report error but continue

parent 1f47cbad
Pipeline #190792 passed with stage
in 4 minutes and 19 seconds
......@@ -35,6 +35,7 @@ void MarkAsCommandHelper::start()
void MarkAsCommandHelper::modifyMessages()
{
auto listElement = mItemsToModify.mid(mIndex, qMin(mIndex + sNumberMaxElement, mItemsToModify.count()));
// qDebug() << " mIndex " << mIndex << "listElement . count " << listElement.count();
mIndex += sNumberMaxElement;
auto modifyJob = new Akonadi::ItemModifyJob(listElement, this);
modifyJob->setIgnorePayload(true);
......@@ -57,16 +58,13 @@ void MarkAsCommandHelper::slotModifyItemDone(KJob *job)
if (job && job->error()) {
qCDebug(AKONADIMIME_LOG) << " Error trying to set item status:" << job->errorText();
emitResult(Akonadi::CommandBase::Failed);
// FIXME ? continue or not if error ?
}
if (mIndex > mItemsToModify.count()) {
qCDebug(AKONADIMIME_LOG) << " finish";
emitResult(Akonadi::CommandBase::OK);
deleteLater();
} else {
if (mIndex > mItemsToModify.count()) {
qCDebug(AKONADIMIME_LOG) << " finish";
emitResult(Akonadi::CommandBase::OK);
deleteLater();
} else {
// Modify more messages
modifyMessages();
}
// Modify more messages
modifyMessages();
}
}
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