[frameworks/kcalendarcore] python: Expose Calendar and ScheduleMessage to python bindings

Dominique MICHEL <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 92df36fcac65de9315a96dbfecd6de3ad139e927 by Dominique MICHEL.
Committed on 10/08/2026 at 14:27.
Pushed by aloeil into branch 'master'.

Expose Calendar and ScheduleMessage to python bindings

For e2e testing we'd like to be able to execute akonadi-calendar's
processITIPMessage method whose interface changed and now requires
Calendar and ScheduleMessage binding.

M  +2    -0    python/CMakeLists.txt
M  +6    -0    python/bindings.h
M  +3    -0    python/typesystem_kcalendarcore.xml

https://invent.kde.org/frameworks/kcalendarcore/-/commit/92df36fcac65de9315a96dbfecd6de3ad139e927

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 1347d32b4..25a59d9cc 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -40,6 +40,8 @@ set(generated_sources
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_occurrenceiterator_wrapper.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_period_wrapper.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_person_wrapper.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/qsharedpointer_calendar_wrapper.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/qsharedpointer_schedulemessage_wrapper.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_recurrence_recurrenceobserver_wrapper.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_recurrencerule_ruleobserver_wrapper.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/KCalendarCore/kcalendarcore_recurrencerule_wrapper.cpp
diff --git a/python/bindings.h b/python/bindings.h
index 6147cebd9..28647c49f 100644
--- a/python/bindings.h
+++ b/python/bindings.h
@@ -39,3 +39,9 @@
 #include <KCalendarCore/Todo>
 #include <KCalendarCore/VCalFormat>
 #include <KCalendarCore/Visitor>
+
+namespace KCalendarCore
+{
+using CalendarPtr = Calendar::Ptr;
+using ScheduleMessagePtr = ScheduleMessage::Ptr;
+}
diff --git a/python/typesystem_kcalendarcore.xml b/python/typesystem_kcalendarcore.xml
index c91ea9e81..251c61a2a 100644
--- a/python/typesystem_kcalendarcore.xml
+++ b/python/typesystem_kcalendarcore.xml
@@ -7,6 +7,9 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accept
     <load-typesystem name="typesystem_core.xml" generate="no"/>
     <load-typesystem name="typesystem_gui.xml" generate="no"/>
 
+    <smart-pointer-type name="QSharedPointer" type="shared" getter="data" reset-method="reset"
+            instantiations="KCalendarCore::Calendar=KCalendarCore::CalendarPtr,KCalendarCore::ScheduleMessage=KCalendarCore::ScheduleMessagePtr"/>
+
     <namespace-type name="KCalendarCore">
         <enum-type name="AccessMode"/>
         <enum-type name="EventSortField"/>
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.