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

List:       kde-commits
Subject:    KDE/kdepim/blogilo/src
From:       Mehrdad Momeny <mehrdad.momeny () gmail ! com>
Date:       2010-02-14 6:49:09
Message-ID: 1266130149.550233.11253.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1089826 by momeny:

A little fix around AddBlog wizard
I think this should fix BUG:226421 too whatever, That crash never happened for me! :|

 M  +9 -4      addeditblog.cpp  


--- trunk/KDE/kdepim/blogilo/src/addeditblog.cpp #1089825:1089826
@@ -290,6 +290,7 @@
     mFetchAPITimer = 0;
     hideWaitWidget();
     ui.txtId->setEnabled( true );
+    ui.txtId->setText( QString() );
     KMessageBox::sorry( this, i18n( "The API guess function has failed, \
 please check your Internet connection. Otherwise, you have to set the API type \
manually on the Advanced tab." ),  i18n( "Auto Configuration Failed" ) );
@@ -299,6 +300,7 @@
 {
     kDebug() << " ErrorType: " << type;
     ui.txtId->setEnabled( true );
+    ui.txtId->setText( QString() );
     hideWaitWidget();
     KMessageBox::detailedError( this, i18n( "Fetching BlogID Failed.\nPlease check \
your Internet connection." ), errorMsg );  }
@@ -347,11 +349,14 @@
             apiUrl = qobject_cast<QLabel*>( blogsList->cellWidget(row, 3) )->text();
         } else
             return;
+    } else if (list.count() > 0) {
+        blogId = list.constBegin()->value("id");
+        blogName = list.constBegin()->value("title");
+        blogUrl = list.constBegin()->value("url");
+        apiUrl = list.constBegin()->value("apiUrl");
     } else {
-        blogId = list.begin()->value("id");
-        blogName = list.begin()->value("title");
-        blogUrl = list.begin()->value("url");
-        apiUrl = list.begin()->value("apiUrl");
+        KMessageBox::sorry(this, i18n("Sorry, No blog found with the specified \
account info.")); +        return;
     }
     ui.txtId->setText( blogId );
     ui.txtTitle->setText( blogName );


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

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