2 commits - cmake/modules conversion/kabcconversion.cpp kolabformatV2/contact.cpp

Christian Mollekopf mollekopf at kolabsys.com
Wed May 15 00:28:03 CEST 2013


 cmake/modules/FindSWIG.cmake  |    7 +------
 conversion/kabcconversion.cpp |    9 ++-------
 kolabformatV2/contact.cpp     |    5 +++--
 3 files changed, 6 insertions(+), 15 deletions(-)

New commits:
commit e7423d80e03085d8dccda629baeb17cbb99a42d4
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Wed May 15 00:20:57 2013 +0200

    Build with cmake 2.8.11
    
    find_package_handle_standard_args already sets SWIG_FOUND, and building
    breaks with cmake 2.8.11 otherwise.
    
    BUG: 1723
    FIXED-IN: 0.4.3

diff --git a/cmake/modules/FindSWIG.cmake b/cmake/modules/FindSWIG.cmake
index f2476a6..010ebb7 100644
--- a/cmake/modules/FindSWIG.cmake
+++ b/cmake/modules/FindSWIG.cmake
@@ -1,9 +1,4 @@
 find_program(SWIG swig /usr/bin/)
-if(SWIG)
-    set(SWIG_FOUND ON)
-    message("SWIG found")
-endif()
 
 #abort if any of the requireds are missing
-find_package_handle_standard_args(SWIG  DEFAULT_MSG
-                                  SWIG_FOUND SWIG)
\ No newline at end of file
+find_package_handle_standard_args(SWIG DEFAULT_MSG SWIG)


commit c2c54d5326f33a82eb81f0906cbad5390f1b861e
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Mon Apr 15 14:39:40 2013 +0200

    Don't use freebusyurlstore directly to avoid creating the korganizer/freebusyurls config file.
    
    Instead the kolab resource should read the custom value and insert it into the FreeBusyUrlStore.

diff --git a/conversion/kabcconversion.cpp b/conversion/kabcconversion.cpp
index 16bda4e..b69aa72 100644
--- a/conversion/kabcconversion.cpp
+++ b/conversion/kabcconversion.cpp
@@ -18,7 +18,6 @@
 #include "kabcconversion.h"
 
 #include "commonconversion.h"
-#include <kcalcore/freebusyurlstore.h>
 #include <kdebug.h>
 #include <qbuffer.h>
 #include <qimagereader.h>
@@ -446,8 +445,7 @@ KABC::Addressee toKABC(const Kolab::Contact &contact)
       if (preferredEmail.isEmpty()) {
           Error() << "f/b url is set but no email address available, skipping";
       } else  {
-        KCalCore::FreeBusyUrlStore::self()->writeUrl( preferredEmail, fromStdString(contact.freeBusyUrl()) );
-        KCalCore::FreeBusyUrlStore::self()->sync();
+        addressee.insertCustom("KOLAB", "FreebusyUrl", fromStdString(contact.freeBusyUrl()));
       }
   }
   
@@ -592,10 +590,7 @@ Kolab::Contact fromKABC(const KABC::Addressee &addressee)
     c.setNameComponents(nc);
     
     c.setNote(toStdString(addressee.note()));
-    
-    if ( !addressee.preferredEmail().isEmpty() ) {    
-        c.setFreeBusyUrl(toStdString(KCalCore::FreeBusyUrlStore::self()->readUrl( addressee.preferredEmail() )));
-    }
+    c.setFreeBusyUrl(toStdString(addressee.custom("KOLAB", QString("FreebusyUrl"))));
 
     if (!addressee.title().isEmpty()) {
         c.setTitles(std::vector<std::string>() << toStdString(addressee.title()));
diff --git a/kolabformatV2/contact.cpp b/kolabformatV2/contact.cpp
index 9a02b6d..fd115b4 100644
--- a/kolabformatV2/contact.cpp
+++ b/kolabformatV2/contact.cpp
@@ -33,7 +33,6 @@
 #include "contact.h"
 
 #include <kabc/addressee.h>
-#include <kcalcore/freebusyurlstore.h>
 #include <kdebug.h>
 #include <QFile>
 #include <float.h>
@@ -1063,7 +1062,7 @@ void Contact::setFields( const KABC::Addressee* addressee )
     }
   }
 
-  QString url = KCalCore::FreeBusyUrlStore::self()->readUrl( addressee->preferredEmail() );
+  const QString url = addressee->custom("KOLAB", "FreebusyUrl");
   if ( !url.isEmpty() ) {
     setFreeBusyUrl( url );
   }
@@ -1110,6 +1109,8 @@ void Contact::saveTo( KABC::Addressee* addressee )
                              dateToString( anniversary() ) );
   else
     addressee->removeCustom( "KADDRESSBOOK", "X-Anniversary" );
+  
+  addressee->insertCustom( "KOLAB", "FreebusyUrl", freeBusyUrl() );
 
   // We need to store both the original attachment name and the picture data into the addressee.
   // This is important, otherwise we would save the image under another attachment name w/o deleting the original one!





More information about the commits mailing list