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

List:       kde-commits
Subject:    playground/pim/kblogger/src
From:       Antonio Aloisio <antonio.aloisio () gmail ! com>
Date:       2008-02-19 15:08:26
Message-ID: 1203433706.870195.20120.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 777052 by aloisio:

Add missing Authentication error handling in blogjob class

 M  +8 -2      backend/blogjob.cpp  
 M  +2 -1      media/media.cpp  
 M  +2 -1      post/post.cpp  


--- trunk/playground/pim/kblogger/src/backend/blogjob.cpp #777051:777052
@@ -122,8 +122,8 @@
     case LIST_BLOGS: {
         // NOTE: not all apis, e.g. GData, require authentication, still we use a \
sane default  if ( !d_ptr->setKBlogAuthentication() ){
-            // TODO handle errors
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -153,6 +153,7 @@
         // NOTE: not all apis, e.g. GData, require authentication, still we use a \
sane default  if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+            d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -176,6 +177,7 @@
         // NOTE: not all apis, e.g. GData, require authentication, still we use a \
sane default  if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+            d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -197,6 +199,7 @@
 
         if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -215,9 +218,9 @@
             kError() << "Impossible convert QVariant to BlogPost";
             return;
         }
-
         if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -242,6 +245,7 @@
 
         if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -260,6 +264,7 @@
 
         if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
@@ -283,6 +288,7 @@
 
         if ( !d_ptr->setKBlogAuthentication() ){
             kError() << "You need to authenticate for this task.";
+	    d_ptr->slotExitError( KBlog::Blog::AuthenticationError, "You need to \
authenticate for this task.");  return;
         }
 
--- trunk/playground/pim/kblogger/src/media/media.cpp #777051:777052
@@ -165,7 +165,8 @@
 
 Media::~Media()
 {
-    kDebug();
+    kDebug()  << "Blogname:" << getBlogname() 
+	      << "Name:" << name();
     // they are only pointers to other images, which must not be deleted here
     mFullSizeImage = 0;
     mThumbnail = 0;
--- trunk/playground/pim/kblogger/src/post/post.cpp #777051:777052
@@ -75,7 +75,8 @@
 
 Post::~Post()
 {
-    kDebug();
+    kDebug() << "BlogName:" << getBlogName()
+             << "Post title:" << title();
 }
 
 void Post::setContent(const QString& content)


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

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