diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-23 02:32:10 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-06-23 02:32:10 +0000 |
commit | 672beaaffcce643b8ab17a191327caa771641a7e (patch) | |
tree | 4b4850b93992ba065767768c7f5ff2de2e3e6421 /kresources/carddav/resource.cpp | |
parent | 23f5d4229caea32af49c007de85563158630b5d4 (diff) | |
download | tdepim-672beaaffcce643b8ab17a191327caa771641a7e.tar.gz tdepim-672beaaffcce643b8ab17a191327caa771641a7e.zip |
Major KAddressbook carddav fixes and improvements (should now work with Zimbra once Zimbra fixes a standards compliance issue with contact creation mimetypes)
Fixed handling of close events and save interaction with Kontact and Korganizer
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1141613 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/carddav/resource.cpp')
-rw-r--r-- | kresources/carddav/resource.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp index 77a0e6889..d8d4508d0 100644 --- a/kresources/carddav/resource.cpp +++ b/kresources/carddav/resource.cpp @@ -333,6 +333,7 @@ void ResourceCardDav::loadingQueuePop() { mLoader->setUrl(t->url); mLoader->setParent(this); mLoader->setType(0); + mLoader->setUseURI(mPrefs->getUseURI()); //QDateTime dt(QDate::currentDate()); //mLoader->setRange(dt.addDays(-CACHE_DAYS), dt.addDays(CACHE_DAYS)); @@ -394,17 +395,11 @@ void ResourceCardDav::loadFinished() { QString data = loader->data(); if (!data.isNull() && !data.isEmpty()) { - // TODO: I don't know why, but some schedules on http://carddav-test.ioda.net/ (I used it for testing) - // have some lines separated by single \r rather than \n or \r\n. - // ICalFormat fails to parse that. data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line data.replace('\r', '\n'); log("trying to parse..."); - //printf("PARSING:\n\r%s\n\r", data.ascii()); if (parseData(data)) { - // FIXME: The agenda view can crash when a change is - // made on a remote server and a reload is requested! log("... parsing is ok"); log("clearing changes"); //enableChangeNotification(); @@ -550,6 +545,7 @@ void ResourceCardDav::writingQueuePop() { mWriter->setUrl(t->url); mWriter->setParent(this); mWriter->setType(1); + mWriter->setUseURI(mPrefs->getUseURI()); #ifdef KCARDDAV_DEBUG const QString fout_path = "/tmp/kcarddav_upload_" + identifier() + ".tmp"; @@ -673,6 +669,11 @@ void ResourceCardDav::writingFinished() { mWritingQueueReady = true; updateProgressBar(1); writingQueuePop(); + + // If a URI is required we will need to retrieve it from the server after the new record is committed... + if (mPrefs->getUseURI() == true) { + startLoading(mPrefs->getFullUrl()); + } } // EOF ======================================================================== |