From 3249639d545c209d601ae1aa5b8327b7591a89d6 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Sun, 26 Dec 2021 22:42:34 +0100 Subject: [PATCH] Don't spam with failed to delete item alerts When calendar item is not found in the remote calendar, don't alert with the error messages about that if there - there's no reason to alert users about it if even is already gone. Close-Bug: #419713 --- src/incidencechanger.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/incidencechanger.cpp b/src/incidencechanger.cpp index 9fe99f1..5850e07 100644 --- a/src/incidencechanger.cpp +++ b/src/incidencechanger.cpp @@ -326,7 +326,12 @@ void IncidenceChangerPrivate::handleDeleteJobResult(KJob *job) qCritical() << errorString; if (mShowDialogsOnError) { - KMessageBox::sorry(change->parentWidget, i18n("Error while trying to delete calendar item. Error was: %1", errorString)); + const QString error_msg = i18n("Error while trying to delete calendar item. Error was: %1", errorString); + if (errorString == QStringLiteral("No items found")) { + qCDebug(AKONADICALENDAR_LOG) << error_msg; + } else { + KMessageBox::sorry(change->parentWidget, error_msg); + } } for (const Item &item : items) { -- GitLab