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

List:       kde-commits
Subject:    KDE/kdepimlibs (merge)
From:       Volker Krause <vkrause () kde ! org>
Date:       2009-11-30 8:21:21
Message-ID: 1259569281.922656.15279.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1056439 by vkrause:

SVN_MERGE

Merged revisions 1055214,1055231,1056139,1056141 via svnmerge from 
https://vkrause@svn.kde.org/home/kde/branches/work/akonadi-ports/kdepimlibs

........
  r1055214 | sebsauer | 2009-11-27 16:40:32 +0100 (Fri, 27 Nov 2009) | 1 line
  
  and don't silent eat the error and freeze korganizer but let us know what went \
                wrong and allow to continue working with the consumer process.
........
  r1055231 | sebsauer | 2009-11-27 17:35:09 +0100 (Fri, 27 Nov 2009) | 1 line
  
  don't ignore dbus errors too. here I got an empty defaultId, the resource was not \
configured and there was no error ondication. Beside empty id's someone can also \
                change the id to be an invalid dbus name like e.g. 'myid.'. So, \
                prevent that too.
........
  r1056139 | sebsauer | 2009-11-29 14:36:08 +0100 (Sun, 29 Nov 2009) | 1 line
  
  no return for void
........
  r1056141 | sebsauer | 2009-11-29 14:38:55 +0100 (Sun, 29 Nov 2009) | 1 line
  
  at least print a warning if something failed
........


 _M            . (directory)  
 M  +2 -2      akonadi/contact/recentcontactscollectionrequestjob.cpp  
 M  +16 -1     akonadi/specialcollectionshelperjobs.cpp  
 M  +3 -0      akonadi/specialcollectionsrequestjob.cpp  


--- trunk/KDE/kdepimlibs/akonadi/contact/recentcontactscollectionrequestjob.cpp \
#1056438:1056439 @@ -59,12 +59,12 @@
 
 void RecentContactsCollectionRequestJob::requestDefaultCollection()
 {
-  return SpecialCollectionsRequestJob::requestDefaultCollection( sRecentContactsType \
); +  SpecialCollectionsRequestJob::requestDefaultCollection( sRecentContactsType );
 }
 
 void RecentContactsCollectionRequestJob::requestCollection( const AgentInstance \
&instance )  {
-  return SpecialCollectionsRequestJob::requestCollection( sRecentContactsType, \
instance ); +  SpecialCollectionsRequestJob::requestCollection( sRecentContactsType, \
instance );  }
 
 #include "recentcontactscollectionrequestjob.moc"
--- trunk/KDE/kdepimlibs/akonadi/specialcollectionshelperjobs.cpp #1056438:1056439
@@ -112,6 +112,7 @@
 void ResourceScanJob::Private::fetchResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     return;
   }
 
@@ -265,6 +266,7 @@
 void DefaultResourceJobPrivate::resourceCreateResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     //fail( i18n( "Failed to create the default resource (%1).", job->errorString() \
) );  q->setError( job->error() );
     q->setErrorText( job->errorText() );
@@ -283,13 +285,22 @@
     kDebug() << "Created maildir resource with id" << defaultResourceId( mSettings \
);  }
 
+  const QString defaultId = defaultResourceId( mSettings );
+
   // Configure the resource.
   {
     agent.setName( mDefaultResourceOptions.value( QLatin1String( "Name" ) \
).toString() );  
-    QDBusInterface conf( QString::fromLatin1( "org.freedesktop.Akonadi.Resource." ) \
+ defaultResourceId( mSettings ), +    QDBusInterface conf( QString::fromLatin1( \
"org.freedesktop.Akonadi.Resource." ) + defaultId,  QString::fromLatin1( "/Settings" \
), QString() );  
+    if( ! conf.isValid() ) {
+      q->setError( -1 );
+      q->setErrorText( i18n("Invalid resource identifier '%1'", defaultId) );
+      q->emitResult();
+      return;
+    }
+                         
     QMapIterator<QString, QVariant> it( mDefaultResourceOptions );
     while ( it.hasNext() ) {
       it.next();
@@ -329,6 +340,7 @@
 void DefaultResourceJobPrivate::resourceSyncResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     //fail( i18n( "ResourceSynchronizationJob failed (%1).", job->errorString() ) );
     return;
   }
@@ -343,6 +355,7 @@
 void DefaultResourceJobPrivate::collectionFetchResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     //fail( i18n( "Failed to fetch the root maildir collection (%1).", \
job->errorString() ) );  return;
   }
@@ -410,6 +423,7 @@
 void DefaultResourceJobPrivate::collectionModifyResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     //fail( i18n( "Failed to modify the root maildir collection (%1).", \
job->errorString() ) );  return;
   }
@@ -474,6 +488,7 @@
 void DefaultResourceJob::slotResult( KJob *job )
 {
   if ( job->error() ) {
+    kWarning() << job->errorText();
     // Do some cleanup.
     if ( !d->mResourceWasPreexisting ) {
       // We only removed the resource instance if we have created it.
--- trunk/KDE/kdepimlibs/akonadi/specialcollectionsrequestjob.cpp #1056438:1056439
@@ -113,6 +113,9 @@
 {
   if ( job->error() ) {
     kWarning() << "Failed to get lock:" << job->errorString();
+    q->setError( job->error() );
+    q->setErrorText( job->errorString() );
+    q->emitResult();
     return;
   }
 


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

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