[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/kresources/slox
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2009-11-27 11:59:48
Message-ID: 1259323188.765158.9197.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1055134 by tokoe:

Fix deletion and editing of events and todos with OX/6


 M  +14 -0     kcalresourceslox.cpp  


--- trunk/KDE/kdepim/kresources/slox/kcalresourceslox.cpp #1055133:1055134
@@ -352,6 +352,10 @@
 
     if ( type() == "ox" ) {
       WebdavHandler::addSloxElement( this, doc, prop, "method", "DELETE" );
+      if ( mUploadedIncidence->type() == "Event" )
+        WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), \
mPrefs->calendarFolderId() ); +      else if ( mUploadedIncidence->type() == "Todo" )
+        WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), \
mPrefs->taskFolderId() );  } else {
       QDomElement remove = WebdavHandler::addElement( doc, pu, "D:remove" );
       QDomElement prop = WebdavHandler::addElement( doc, remove, "D:prop" );
@@ -1169,6 +1173,16 @@
           i->setUid( uid );
           i->setCustomProperty( "SLOX", "ID", sloxId );
 
+          if ( type() == "ox" ) {
+            // Update the last_modified property
+            const QDomNode lastModifiedNode = prop.namedItem( fieldName( \
LastModified ) ); +            if ( !lastModifiedNode.isNull() ) {
+              const QDomElement lastModifiedElement = lastModifiedNode.toElement();
+              const QString lastModified = lastModifiedElement.text();
+              i->setCustomProperty( "SLOX", "LastModified", lastModified );
+            }
+          }
+
           disableChangeNotification();
           calendar()->deleteIncidence( mUploadedIncidence );
           calendar()->addIncidence( i );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic