[pim/akonadi-calendar] src: Use KCalendarCore::Exception::errorMessage

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

Use KCalendarCore::Exception::errorMessage

Moved upstream from KCalUtils.

M  +10   -1    src/itiphandler.cpp

https://invent.kde.org/pim/akonadi-calendar/-/commit/70a161913b486e73e2da510facb1352ee6ba0850

diff --git a/src/itiphandler.cpp b/src/itiphandler.cpp
index 9a72ec82..05145042 100644
--- a/src/itiphandler.cpp
+++ b/src/itiphandler.cpp
@@ -18,10 +18,14 @@
 #include "publishdialog.h"
 #include "utils_p.h"
 
-#include <KCalUtils/Stringify>
 #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>
 
@@ -115,8 +119,13 @@ void ITIPHandler::processiTIPMessage(const QString &receiver, const QString &iCa
     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;
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.