summaryrefslogtreecommitdiffstats
path: root/kresources/caldav/writer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 21:36:58 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 21:36:58 +0000
commit5abbdb459be7870848ef16691174e91c68958304 (patch)
tree1fb80e5febb13f0a82e97f2200f51ebeaff22d61 /kresources/caldav/writer.cpp
parentba9ae64c036bad58a9d9f6ca49986913d44502d9 (diff)
downloadtdepim-5abbdb459be7870848ef16691174e91c68958304.tar.gz
tdepim-5abbdb459be7870848ef16691174e91c68958304.zip
* Fixed CalDAV resource error messages and potential crash
* Added write support to events with RECURRENCE-ID property Only remaining potential issue is modification of parent series and association/update/delete of child event RECURRENCE-ID fields git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1169262 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/caldav/writer.cpp')
-rw-r--r--kresources/caldav/writer.cpp80
1 files changed, 41 insertions, 39 deletions
diff --git a/kresources/caldav/writer.cpp b/kresources/caldav/writer.cpp
index 4580df514..c4101a0b3 100644
--- a/kresources/caldav/writer.cpp
+++ b/kresources/caldav/writer.cpp
@@ -49,54 +49,56 @@ int CalDavWriter::runJob(runtime_info* RT) {
int res = OK;
- kdDebug() << "pushing added objects";
- res = pushObjects(mAdded, caldav_add_object, OK, RT);
- if (OK == res) {
+ if ((OK == res) && (url() != "")) {
+ kdDebug() << "pushing added objects";
+ res = pushObjects(mAdded, caldav_add_object, OK, RT);
+ if (OK == res) {
#ifdef USE_CALDAV_MODIFY
- kdDebug() << "pushing changed objects";
- res = pushObjects(mChanged, caldav_modify_object, OK, RT);
- if (OK == res) {
- kdDebug() << "pushing deleted objects";
- res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
- }
+ kdDebug() << "pushing changed objects";
+ res = pushObjects(mChanged, caldav_modify_object, OK, RT);
+ if (OK == res) {
+ kdDebug() << "pushing deleted objects";
+ res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
+ }
#else // if USE_CALDAV_MODIFY
- kdDebug() << "pushing changed objects (delete)";
- res = pushObjects(mChanged, caldav_delete_object, OK, RT);
- if (OK == res) {
- kdDebug() << "pushing changed objects (add)";
- res = pushObjects(mChanged, caldav_add_object, OK, RT);
- if (OK == res) {
- kdDebug() << "pushing deleted objects";
- res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
- }
- }
+ kdDebug() << "pushing changed objects (delete)";
+ res = pushObjects(mChanged, caldav_delete_object, OK, RT);
+ if (OK == res) {
+ kdDebug() << "pushing changed objects (add)";
+ res = pushObjects(mChanged, caldav_add_object, OK, RT);
+ if (OK == res) {
+ kdDebug() << "pushing deleted objects";
+ res = pushObjects(mDeleted, caldav_delete_object, OK, 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() != "")) {
+ kdDebug() << "pushing added tasks objects";
+ res = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT);
+ if (OK == res) {
#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);
- }
+ 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);
- }
- }
+ 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) {