Commit 00454bfa authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to cancel action

parent 8d590e75
Pipeline #73740 failed with stage
in 1 minute and 39 seconds
......@@ -23,9 +23,13 @@ Akonadi::Item::List ConfirmBeforeDeletingInterface::exec(const Akonadi::Item::Li
QString checkFoundStr;
for (const auto &item : list) {
if (ConfirmBeforeDeletingManager::self()->deletingNeedToConfirm(item, checkFoundStr)) {
if (KMessageBox::questionYesNo(parentWidget(), i18n("Do you want to delete this email?\n%1", checkFoundStr), i18n("Confirm Delete Mail"))
== KMessageBox::Yes) {
auto result =
KMessageBox::questionYesNoCancel(parentWidget(), i18n("Do you want to delete this email?\n%1", checkFoundStr), i18n("Confirm Delete Mail"));
if (result == KMessageBox::Yes) {
lst << item;
} else if (result == KMessageBox::Cancel) {
lst.clear();
break;
}
} else {
lst << item;
......
Markdown is supported
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