[frameworks/kcalendarcore] /: Revert "Change parseScheduleMessage to take a QByteArray as input"

Allen Winter <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 1c9b1f478ce254507917e06b734460f07c1d99cc by Allen Winter.
Committed on 07/08/2026 at 18:39.
Pushed by winterz into branch 'master'.

Revert "Change parseScheduleMessage to take a QByteArray as input"

This reverts commit 5c879d10f619c206f7f9affe04bee774cc035c6b

M  +1    -1    autotests/testicalformat.cpp
M  +1    -1    src/CMakeLists.txt
M  +1    -8    src/icalformat.cpp
M  +1    -20   src/icalformat.h

https://invent.kde.org/frameworks/kcalendarcore/-/commit/1c9b1f478ce254507917e06b734460f07c1d99cc

diff --git a/autotests/testicalformat.cpp b/autotests/testicalformat.cpp
index 508585b6c..56eba9fd3 100644
--- a/autotests/testicalformat.cpp
+++ b/autotests/testicalformat.cpp
@@ -506,7 +506,7 @@ void ICalFormatTest::testAllDaySchedulingMessage()
     const auto itipString = format.createScheduleMessage(event, KCalendarCore::iTIPRequest);
     QVERIFY(!itipString.isEmpty());
 
-    auto scheduleMsg = format.parseScheduleMessage(calendar, itipString.toUtf8());
+    auto scheduleMsg = format.parseScheduleMessage(calendar, itipString);
     QVERIFY(scheduleMsg->error().isEmpty());
 
     auto parsedEvent = scheduleMsg->event().staticCast<KCalendarCore::Event>();
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5917a2c44..b50dafae9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -130,7 +130,7 @@ ecm_generate_export_header(KF6CalendarCore
     VERSION ${KF_VERSION}
     USE_VERSION_HEADER
     DEPRECATED_BASE_VERSION 0
-    DEPRECATION_VERSIONS 6.30
+    DEPRECATION_VERSIONS
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
 )
 
diff --git a/src/icalformat.cpp b/src/icalformat.cpp
index 492fa8242..b6930d1a7 100644
--- a/src/icalformat.cpp
+++ b/src/icalformat.cpp
@@ -499,14 +499,7 @@ FreeBusy::Ptr ICalFormat::parseFreeBusy(const QString &str)
     return freeBusy;
 }
 
-#if KCALENDARCORE_BUILD_DEPRECATED_SINCE(6, 30)
 ScheduleMessage::Ptr ICalFormat::parseScheduleMessage(const Calendar::Ptr &cal, const QString &messageText)
-{
-    return parseScheduleMessage(cal, messageText.toUtf8());
-}
-#endif
-
-ScheduleMessage::Ptr ICalFormat::parseScheduleMessage(const Calendar::Ptr &cal, const QByteArray &messageText)
 {
     Q_D(ICalFormat);
     setTimeZone(cal->timeZone());
@@ -517,7 +510,7 @@ ScheduleMessage::Ptr ICalFormat::parseScheduleMessage(const Calendar::Ptr &cal,
         return ScheduleMessage::Ptr();
     }
 
-    icalcomponent *message = icalparser_parse_string(messageText.constData());
+    icalcomponent *message = icalparser_parse_string(messageText.toUtf8().constData());
 
     if (!message) {
         setException(new Exception(Exception::ParseErrorUnableToParse));
diff --git a/src/icalformat.h b/src/icalformat.h
index db13a8087..285b93195 100644
--- a/src/icalformat.h
+++ b/src/icalformat.h
@@ -181,9 +181,8 @@ public:
 
       Returns a QString containing the message if successful; 0 otherwise.
     */
-    Q_REQUIRED_RESULT QString createScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method); // TODO KF7 return a QByteArray instead
+    Q_REQUIRED_RESULT QString createScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method);
 
-#if KCALENDARCORE_ENABLE_DEPRECATED_SINCE(6, 30)
     /*!
       Parses a Calendar scheduling message string into ScheduleMessage object.
 
@@ -195,25 +194,7 @@ public:
       Returns a pointer to a ScheduleMessage object if successful; 0 otherwise.
       The calling routine may later free the return memory.
     */
-    KCALENDARCORE_DEPRECATED_VERSION(6, 30, "use the QByteArray overload instead")
     ScheduleMessage::Ptr parseScheduleMessage(const Calendar::Ptr &calendar, const QString &string);
-#endif
-
-    /*!
-      Parses a Calendar scheduling message string into ScheduleMessage object.
-
-      \a calendar is a pointer to a Calendar object associated with the
-      scheduling message. This calendar will also be searched for pre-existing
-      instances of the incidence referred to in the scheduling message.
-
-      \a messageText is containing the data to be parsed.
-
-      Returns a pointer to a ScheduleMessage object if successful; 0 otherwise.
-      The calling routine may later free the return memory.
-
-      \since 6.30 (took a QString as argument previously)
-    */
-    [[nodiscard]] ScheduleMessage::Ptr parseScheduleMessage(const Calendar::Ptr &calendar, const QByteArray &messageText);
 
     /*!
       Converts a QString into a FreeBusy object.
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.