[pim/akonadi-calendar] src: Remove the now unused string-based processITIPMessage overload

Volker Krause <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 6083531dd471449fc65de293ec896f263fcef8b1 by Volker Krause.
Committed on 09/08/2026 at 07:05.
Pushed by vkrause into branch 'master'.

Remove the now unused string-based processITIPMessage overload

M  +0    -58   src/itiphandler.cpp
M  +0    -11   src/itiphandler.h
M  +1    -5    src/itiphandler_p.cpp
M  +0    -1    src/itiphandler_p.h

https://invent.kde.org/pim/akonadi-calendar/-/commit/6083531dd471449fc65de293ec896f263fcef8b1

diff --git a/src/itiphandler.cpp b/src/itiphandler.cpp
index 05145042..a77f70ef 100644
--- a/src/itiphandler.cpp
+++ b/src/itiphandler.cpp
@@ -19,13 +19,8 @@
 #include "utils_p.h"
 
 #include <KCalendarCore/Attendee>
-#include <KCalendarCore/Exceptions>
 #include <KCalendarCore/ICalFormat>
 
-#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(6, 30, 0)
-#include <KCalUtils/Stringify>
-#endif
-
 #include <Akonadi/MessageQueueJob>
 #include <KIdentityManagementCore/IdentityManager>
 
@@ -89,59 +84,6 @@ ITIPHandler::ITIPHandler(ITIPHandlerComponentFactory *factory, QObject *parent)
 
 ITIPHandler::~ITIPHandler() = default;
 
-void ITIPHandler::processiTIPMessage(const QString &receiver, const QString &iCal, const QString &action)
-{
-    qCDebug(AKONADICALENDAR_LOG) << "processiTIPMessage called with receiver=" << receiver << "; action=" << action;
-
-    if (d->m_currentOperation != OperationNone) {
-        d->m_currentOperation = OperationNone;
-        qCritical() << "There can't be an operation in progress!" << d->m_currentOperation;
-        return;
-    }
-
-    d->m_currentOperation = OperationProcessiTIPMessage;
-
-    if (!d->isLoaded()) {
-        d->m_queuedInvitation.receiver = receiver;
-        d->m_queuedInvitation.iCal = iCal;
-        d->m_queuedInvitation.action = action;
-        return;
-    }
-
-    if (d->m_calendarLoadError) {
-        d->m_currentOperation = OperationNone;
-        qCritical() << "Error loading calendar";
-        emitiTipMessageProcessed(this, ResultError, i18n("Error loading calendar."));
-        return;
-    }
-
-    KCalendarCore::ICalFormat format;
-    KCalendarCore::ScheduleMessage::Ptr const message = format.parseScheduleMessage(d->calendar(), iCal);
-
-    if (!message) {
-#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(6, 30, 0)
-        const QString errorMessage = format.exception() ? i18n("Error message: %1", KCalUtils::Stringify::errorMessage(*format.exception()))
-                                                        : i18n("Unknown error while parsing iCal invitation");
-#else
-        const QString errorMessage =
-            format.exception() ? i18n("Error message: %1", format.exception()->errorMessage()) : i18n("Unknown error while parsing iCal invitation");
-#endif
-
-        qCritical() << "Error parsing" << errorMessage;
-
-        if (d->m_showDialogsOnError) {
-            KMessageBox::detailedError(nullptr, // mParent, TODO
-                                       i18n("Error while processing an invitation or update."),
-                                       errorMessage);
-        }
-
-        d->m_currentOperation = OperationNone;
-        emitiTipMessageProcessed(this, ResultError, errorMessage);
-
-        return;
-    }
-}
-
 void ITIPHandler::processiTIPMessage(const QString &receiver, const KCalendarCore::ScheduleMessage::Ptr &message, const QString &action)
 {
     qCDebug(AKONADICALENDAR_LOG) << "processiTIPMessage called with receiver=" << receiver << "; action=" << action;
diff --git a/src/itiphandler.h b/src/itiphandler.h
index bf844882..c9c8648c 100644
--- a/src/itiphandler.h
+++ b/src/itiphandler.h
@@ -301,17 +301,6 @@ public:
      */
     ~ITIPHandler() override;
 
-    /*!
-     * Processes a received iTip message.
-     *
-     * \a receiver
-     * \a iCal
-     * \a action
-     *
-     * \sa iTipMessageProcessed()
-     */
-    [[deprecated("use the ScheduleMessage overload instead")]]
-    void processiTIPMessage(const QString &receiver, const QString &iCal, const QString &action);
     /*!
      * Processes a received iTip message.
      *
diff --git a/src/itiphandler_p.cpp b/src/itiphandler_p.cpp
index b7091542..6cc0c783 100644
--- a/src/itiphandler_p.cpp
+++ b/src/itiphandler_p.cpp
@@ -79,11 +79,7 @@ void ITIPHandlerPrivate::onLoadFinished(bool success, const QString &errorMessag
             // Harmless hack, processiTIPMessage() asserts that there's not current operation running
             // to prevent users from calling it twice.
             m_currentOperation = OperationNone;
-            if (m_queuedInvitation.message) {
-                q->processiTIPMessage(m_queuedInvitation.receiver, m_queuedInvitation.message, m_queuedInvitation.action);
-            } else {
-                q->processiTIPMessage(m_queuedInvitation.receiver, m_queuedInvitation.iCal, m_queuedInvitation.action);
-            }
+            q->processiTIPMessage(m_queuedInvitation.receiver, m_queuedInvitation.message, m_queuedInvitation.action);
         } else {
             Q_EMIT q->iTipMessageProcessed(ITIPHandler::ResultError, i18n("Error loading calendar: %1", errorMessage));
         }
diff --git a/src/itiphandler_p.h b/src/itiphandler_p.h
index 95ae5f36..e40a2d10 100644
--- a/src/itiphandler_p.h
+++ b/src/itiphandler_p.h
@@ -21,7 +21,6 @@ namespace Akonadi
 {
 struct Invitation {
     QString receiver;
-    QString iCal;
     KCalendarCore::ScheduleMessage::Ptr message;
     QString action;
     KCalendarCore::iTIPMethod method;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.