diff options
Diffstat (limited to 'kresources/caldav/writer.cpp')
-rw-r--r-- | kresources/caldav/writer.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kresources/caldav/writer.cpp b/kresources/caldav/writer.cpp index 98008bcd8..4580df514 100644 --- a/kresources/caldav/writer.cpp +++ b/kresources/caldav/writer.cpp @@ -28,6 +28,7 @@ // It's done, because, for some reason, SOGo server returns an error // on caldav_modify_object. DAViCAL works fine both ways. #define USE_CALDAV_MODIFY +#define USE_CALDAV_TASKS_MODIFY /*========================================================================= | NAMESPACE @@ -72,6 +73,32 @@ int CalDavWriter::runJob(runtime_info* RT) { #endif // if USE_CALDAV_MODIFY } + res = OK; + + kdDebug() << "pushing added tasks objects"; + res = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT); + if ((OK == res) && (tasksUrl() != "")) { +#ifdef USE_CALDAV_TASKS_MODIFY + kdDebug() << "pushing changed objects"; + res = pushTasksObjects(mTasksChanged, caldav_tasks_modify_object, OK, RT); + if (OK == res) { + kdDebug() << "pushing deleted objects"; + res = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); + } +#else // if USE_CALDAV_TASKS_MODIFY + kdDebug() << "pushing changed objects (delete)"; + res = pushTasksObjects(mTasksChanged, caldav_tasks_delete_object, OK, RT); + if (OK == res) { + kdDebug() << "pushing changed objects (add)"; + res = pushTasksObjects(mTasksChanged, caldav_add_object, OK, RT); + if (OK == res) { + kdDebug() << "pushing deleted objects"; + res = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); + } + } +#endif // if USE_CALDAV_TASKS_MODIFY + } + if (OK != res) { clearObjects(); } |