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

List:       kde-commits
Subject:    kdepim/kresources/opengroupware
From:       Cornelius Schumacher <schumacher () kde ! org>
Date:       2004-11-01 0:20:01
Message-ID: 20041101002001.289B716C7F () office ! kde ! org
[Download RAW message or body]

CVS commit by cschumac: 

Evaluate folder type.


  M +9 -3      folderlister.cpp   1.6


--- kdepim/kresources/opengroupware/folderlister.cpp  #1.5:1.6
@@ -170,4 +170,7 @@ void FolderLister::slotListJobResult( KI
       QString displayName;
       bool isFolder = false;
+      bool isEventFolder = false;
+      bool isContactFolder = false;
+      bool isTodoFolder = false;
 
       QDomNode n4;
@@ -177,10 +180,13 @@ void FolderLister::slotListJobResult( KI
         if ( e.tagName() == "displayname" ) displayName = e.text();
         if ( e.tagName() == "resourcetype" ) {
-          QDomNode n5 = e.namedItem( "collection" );
-          if ( !n5.isNull() ) isFolder = true;
+          isFolder = !e.namedItem( "collection" ).isNull();
+          isEventFolder = !e.namedItem( "vevent-collection" ).isNull();
+          isTodoFolder = !e.namedItem( "vtodo-collection" ).isNull();
+          isContactFolder = !e.namedItem( "vcard-collection" ).isNull();
         }
       }
 
-      if ( isFolder ) {
+      if ( ( isFolder && mType == Calendar ) ||
+           ( isContactFolder && mType == AddressBook ) ) {
         QDomNode n6 = n.namedItem( "href" );
         QDomElement e2 = n6.toElement();


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

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