262
263
kDebug() << d->ui.comboApi->currentIndex();
264
265
switch ( d->ui.comboApi->currentIndex() ) {
270
KBlog::Blogger1 *blog = new KBlog::Blogger1( KUrl( d->ui.txtUrl->text() ), this );
272
blog->setUsername( d->ui.txtUser->text() );
273
blog->setPassword( d->ui.txtPass->text() );
274
connect( blog , SIGNAL(listedBlogs(QList<QMap<QString,QString> >)),
275
this, SLOT(fetchedBlogId(QList<QMap<QString,QString> >)) );
276
d->mFetchBlogIdTimer = new QTimer( this );
277
d->mFetchBlogIdTimer->setSingleShot( true );
278
connect( d->mFetchBlogIdTimer, SIGNAL(timeout()), this, SLOT(handleFetchIDTimeout()) );
279
d->mFetchBlogIdTimer->start( TIMEOUT );
285
KBlog::GData* blog = new KBlog::GData( d->ui.txtUrl->text() , this );
287
blog->setUsername( d->ui.txtUser->text() );
288
blog->setPassword( d->ui.txtPass->text() );
289
connect( blog, SIGNAL(fetchedProfileId(QString)),
290
this, SLOT(fetchedProfileId(QString)) );
291
blog->fetchProfileId();
292
d->mFetchProfileIdTimer = new QTimer( this );
293
d->mFetchProfileIdTimer->setSingleShot( true );
294
connect( d->mFetchProfileIdTimer, SIGNAL(timeout()), this, SLOT(handleFetchIDTimeout()) );
295
d->mFetchProfileIdTimer->start( TIMEOUT );
299
kDebug()<<"Unknown API";
271
KBlog::Blogger1 *blog = new KBlog::Blogger1( KUrl( d->ui.txtUrl->text() ), this );
273
blog->setUsername( d->ui.txtUser->text() );
274
blog->setPassword( d->ui.txtPass->text() );
275
connect( blog , SIGNAL(listedBlogs(QList<QMap<QString,QString> >)),
276
this, SLOT(fetchedBlogId(QList<QMap<QString,QString> >)) );
277
d->mFetchBlogIdTimer = new QTimer( this );
278
d->mFetchBlogIdTimer->setSingleShot( true );
279
connect( d->mFetchBlogIdTimer, SIGNAL(timeout()), this, SLOT(handleFetchIDTimeout()) );
280
d->mFetchBlogIdTimer->start( TIMEOUT );
286
KBlog::GData* blog = new KBlog::GData( d->ui.txtUrl->text() , this );
288
blog->setUsername( d->ui.txtUser->text() );
289
blog->setPassword( d->ui.txtPass->text() );
290
connect( blog, SIGNAL(fetchedProfileId(QString)),
291
this, SLOT(fetchedProfileId(QString)) );
292
blog->fetchProfileId();
293
d->mFetchProfileIdTimer = new QTimer( this );
294
d->mFetchProfileIdTimer->setSingleShot( true );
295
connect( d->mFetchProfileIdTimer, SIGNAL(timeout()), this, SLOT(handleFetchIDTimeout()) );
296
d->mFetchProfileIdTimer->start( TIMEOUT );
300
kDebug()<<"Unknown API";
303
305
connect( d->mBlog, SIGNAL(error(KBlog::Blog::ErrorType,QString)),
304
306
this, SLOT(handleFetchError(KBlog::Blog::ErrorType,QString)) );
305
307
d->ui.txtId->setText( i18n( "Please wait..." ) );