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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/korganizer
From:       David Faure <faure () kde ! org>
Date:       2007-05-24 11:48:53
Message-ID: 1180007333.118163.21570.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 667902 by dfaure:

This isn't python, use { } to put two statements inside an if()! Sigh.
This fixes loading the freebusy list for people with a "preferred email address".


 M  +9 -7      branches/KDE/3.5/kdepim/korganizer/freebusymanager.cpp  
 M  +9 -7      branches/kdepim/enterprise/kdepim/korganizer/freebusymanager.cpp  
 M  +2 -4      branches/kdepim/proko2/kdepim/korganizer/freebusymanager.cpp  
 M  +5 -5      trunk/KDE/kdepim/korganizer/freebusymanager.cpp  


--- branches/KDE/3.5/kdepim/korganizer/freebusymanager.cpp #667901:667902
@@ -109,11 +109,10 @@
     mManager->saveFreeBusy( fb, p );
   }
   emit freeBusyDownloaded( fb, mEmail );
-  // PENDING(steffen): Is this safe?
-  //job->deleteLater();
-  delete this;
+  deleteLater();
 }
 
+////
 
 FreeBusyManager::FreeBusyManager( QObject *parent, const char *name )
   : QObject( parent, name ),
@@ -159,7 +158,7 @@
 
 void FreeBusyManager::slotPerhapsUploadFB()
 {
-  // user has automtic uploading disabled, bail out
+  // user has automatic uploading disabled, bail out
   if ( !KOPrefs::instance()->freeBusyPublishAuto() ||
        KOPrefs::instance()->freeBusyPublishUrl().isEmpty() )
      return;
@@ -400,7 +399,7 @@
   cfg.setGroup( email );
   QString url = cfg.readEntry( "url" );
   if ( !url.isEmpty() ) {
-    kdDebug(5850) << "found cached url: " << url << endl; 
+    kdDebug(5850) << "found cached url: " << url << endl;
     return KURL( url );
   }
   // Try with the url configurated by preferred email in kaddressbook
@@ -414,16 +413,19 @@
         "Preferred email of " << email << " is " << pref << endl;
       cfg.setGroup( pref );
       url = cfg.readEntry ( "url" );
-      if ( !url.isEmpty() )
+      if ( !url.isEmpty() ) {
         kdDebug( 5850 ) << "FreeBusyManager::freeBusyUrl():" <<
           "Taken url from preferred email:" << url << endl;
         return KURL( url );
+      }
     }
   }
   // None found. Check if we do automatic FB retrieving then
-  if ( !KOPrefs::instance()->mFreeBusyRetrieveAuto )
+  if ( !KOPrefs::instance()->mFreeBusyRetrieveAuto ) {
+    kdDebug( 5850 ) << "no auto retrieving" << endl;
     // No, so no FB list here
     return KURL();
+  }
 
   // Sanity check: Don't download if it's not a correct email
   // address (this also avoids downloading for "(empty email)").
--- branches/kdepim/enterprise/kdepim/korganizer/freebusymanager.cpp #667901:667902
@@ -109,11 +109,10 @@
     mManager->saveFreeBusy( fb, p );
   }
   emit freeBusyDownloaded( fb, mEmail );
-  // PENDING(steffen): Is this safe?
-  //job->deleteLater();
-  delete this;
+  deleteLater();
 }
 
+////
 
 FreeBusyManager::FreeBusyManager( QObject *parent, const char *name )
   : QObject( parent, name ),
@@ -159,7 +158,7 @@
 
 void FreeBusyManager::slotPerhapsUploadFB()
 {
-  // user has automtic uploading disabled, bail out
+  // user has automatic uploading disabled, bail out
   if ( !KOPrefs::instance()->freeBusyPublishAuto() ||
        KOPrefs::instance()->freeBusyPublishUrl().isEmpty() )
      return;
@@ -400,7 +399,7 @@
   cfg.setGroup( email );
   QString url = cfg.readEntry( "url" );
   if ( !url.isEmpty() ) {
-    kdDebug(5850) << "found cached url: " << url << endl; 
+    kdDebug(5850) << "found cached url: " << url << endl;
     return KURL( url );
   }
   // Try with the url configurated by preferred email in kaddressbook
@@ -414,16 +413,19 @@
         "Preferred email of " << email << " is " << pref << endl;
       cfg.setGroup( pref );
       url = cfg.readEntry ( "url" );
-      if ( !url.isEmpty() )
+      if ( !url.isEmpty() ) {
         kdDebug( 5850 ) << "FreeBusyManager::freeBusyUrl():" <<
           "Taken url from preferred email:" << url << endl;
         return KURL( url );
+      }
     }
   }
   // None found. Check if we do automatic FB retrieving then
-  if ( !KOPrefs::instance()->mFreeBusyRetrieveAuto )
+  if ( !KOPrefs::instance()->mFreeBusyRetrieveAuto ) {
+    kdDebug( 5850 ) << "no auto retrieving" << endl;
     // No, so no FB list here
     return KURL();
+  }
 
   // Sanity check: Don't download if it's not a correct email
   // address (this also avoids downloading for "(empty email)").
--- branches/kdepim/proko2/kdepim/korganizer/freebusymanager.cpp #667901:667902
@@ -99,9 +99,7 @@
 
   FreeBusy *fb = mManager->iCalToFreeBusy( mFreeBusyData );
   emit freeBusyDownloaded( fb, mEmail );
-  // PENDING(steffen): Is this safe?
-  //job->deleteLater();
-  delete this;
+  deleteLater();
 }
 
 
@@ -149,7 +147,7 @@
 
 void FreeBusyManager::slotPerhapsUploadFB()
 {
-  // user has automtic uploading disabled, bail out
+  // user has automatic uploading disabled, bail out
   if ( !KOPrefs::instance()->freeBusyPublishAuto() )
      return;
   if( mTimerID != 0 )
--- trunk/KDE/kdepim/korganizer/freebusymanager.cpp #667901:667902
@@ -109,11 +109,10 @@
     mManager->saveFreeBusy( fb, p );
   }
   emit freeBusyDownloaded( fb, mEmail );
-  // PENDING(steffen): Is this safe?
-  //job->deleteLater();
-  delete this;
+  deleteLater();
 }
 
+////
 
 FreeBusyManager::FreeBusyManager( QObject *parent ) : QObject( parent ),
     mCalendar( 0 ), mTimerID( 0 ), mUploadingFreeBusy( false )
@@ -158,7 +157,7 @@
 
 void FreeBusyManager::slotPerhapsUploadFB()
 {
-  // user has automtic uploading disabled, bail out
+  // user has automatic uploading disabled, bail out
   if ( !KOPrefs::instance()->freeBusyPublishAuto() ||
        KOPrefs::instance()->freeBusyPublishUrl().isEmpty() )
      return;
@@ -412,10 +411,11 @@
         "Preferred email of " << email << " is " << pref << endl;
       group = cfg.group(pref);
       url = group.readEntry ( "url" );
-      if ( !url.isEmpty() )
+      if ( !url.isEmpty() ) {
         kDebug( 5850 ) << "FreeBusyManager::freeBusyUrl():" <<
           "Taken url from preferred email:" << url << endl;
         return KUrl( url );
+      }
     }
   }
   // None found. Check if we do automatic FB retrieving then
[prev in list] [next in list] [prev in thread] [next in thread] 

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