[pim/calendarsupport] src: Use KCalendarCore::Exception::errorMessage

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

Use KCalendarCore::Exception::errorMessage

Moved upstream from KCalUtils.

M  +8    -2    src/eventarchiver.cpp

https://invent.kde.org/pim/calendarsupport/-/commit/f4a48f1ab8ba307a2ac47361db9906a25262f9f9

diff --git a/src/eventarchiver.cpp b/src/eventarchiver.cpp
index 238674f9..50fd87af 100644
--- a/src/eventarchiver.cpp
+++ b/src/eventarchiver.cpp
@@ -14,11 +14,14 @@ using namespace Qt::Literals::StringLiterals;
 #include <Akonadi/CalendarUtils>
 #include <Akonadi/IncidenceChanger>
 
+#include <KCalendarCore/Exceptions>
 #include <KCalendarCore/FileStorage>
 #include <KCalendarCore/ICalFormat>
 #include <KCalendarCore/MemoryCalendar>
 
+#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(6, 30, 0)
 #include <KCalUtils/Stringify>
+#endif
 
 #include "calendarsupport_debug.h"
 #include <KIO/FileCopyJob>
@@ -32,7 +35,6 @@ using namespace Qt::Literals::StringLiterals;
 #include <QTimeZone>
 
 using namespace KCalendarCore;
-using namespace KCalUtils;
 using namespace CalendarSupport;
 
 namespace
@@ -273,7 +275,11 @@ void EventArchiver::archiveIncidences(const Akonadi::ETMCalendar::Ptr &calendar,
     if (!archiveStore.save()) {
         QString errmess;
         if (format->exception()) {
-            errmess = Stringify::errorMessage(*format->exception());
+#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(6, 30, 0)
+            errmess = KCalUtils::Stringify::errorMessage(*format->exception());
+#else
+            errmess = format->exception()->errorMessage();
+#endif
         } else {
             errmess = i18nc("save failure cause unknown", "Reason unknown");
         }
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.