~ubuntu-branches/ubuntu/quantal/kdepimlibs/quantal-proposed

« back to all changes in this revision

Viewing changes to kblog/tests/testmetaweblog.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-14 14:37:07 UTC
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: package-import@ubuntu.com-20111214143707-m0qplh3hsd957ukv
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
  qDebug() << "# firstname: " <<  userInfo["firstname"];
141
141
  qDebug() << "##############################\n";
142
142
 
143
 
  connect( b, SIGNAL( listedBlogs( const QList<QMap<QString,QString> >& ) ),
144
 
           this, SLOT( listBlogs( const QList<QMap<QString,QString> >& ) ) );
 
143
  connect( b, SIGNAL(listedBlogs(QList<QMap<QString,QString> >)),
 
144
           this, SLOT(listBlogs(QList<QMap<QString,QString> >)) );
145
145
  b->listBlogs();
146
146
  listBlogsTimer->start( TIMEOUT );
147
147
}
157
157
  }
158
158
  qDebug() << "###########################\n";
159
159
 
160
 
  connect( b, SIGNAL( listedRecentPosts(const QList<KBlog::BlogPost>&) ),
161
 
           this, SLOT( listRecentPosts(const QList<KBlog::BlogPost>&) ) );
 
160
  connect( b, SIGNAL(listedRecentPosts(QList<KBlog::BlogPost>)),
 
161
           this, SLOT(listRecentPosts(QList<KBlog::BlogPost>)) );
162
162
  b->listRecentPosts( DOWNLOADCOUNT );
163
163
  listRecentPostsTimer->start( TIMEOUT );
164
164
}
175
175
  }
176
176
  qDebug() << "#################################\n";
177
177
 
178
 
  connect( b, SIGNAL( listedCategories( const QList<QMap<QString,QString> >& ) ),
179
 
           this, SLOT( listCategories( const QList<QMap<QString,QString> >&) ) );
 
178
  connect( b, SIGNAL(listedCategories(QList<QMap<QString,QString> >)),
 
179
           this, SLOT(listCategories(QList<QMap<QString,QString> >)) );
180
180
  b->listCategories(); // start chain
181
181
  listCategoriesTimer->start( TIMEOUT );
182
182
}
193
193
  }
194
194
  qDebug() << "###############################\n";
195
195
 
196
 
  connect( b, SIGNAL( createdPost( KBlog::BlogPost* ) ),
197
 
           this, SLOT( createPost( KBlog::BlogPost* ) ) );
 
196
  connect( b, SIGNAL(createdPost(KBlog::BlogPost*)),
 
197
           this, SLOT(createPost(KBlog::BlogPost*)) );
198
198
  b->createPost( p ); // start chain
199
199
  createPostTimer->start( TIMEOUT );
200
200
}
207
207
  qDebug() << "################################\n";
208
208
  QVERIFY( post->status() == BlogPost::Created );
209
209
 
210
 
  connect( b, SIGNAL( modifiedPost( KBlog::BlogPost* ) ),
211
 
           this, SLOT( modifyPost( KBlog::BlogPost* ) ) );
 
210
  connect( b, SIGNAL(modifiedPost(KBlog::BlogPost*)),
 
211
           this, SLOT(modifyPost(KBlog::BlogPost*)) );
212
212
  p->setContent( mModifiedContent );
213
213
  b->modifyPost( p );
214
214
  modifyPostTimer->start( TIMEOUT );
222
222
  qDebug() << "################################\n";
223
223
  QVERIFY( post->status() == BlogPost::Modified );
224
224
 
225
 
  connect( b, SIGNAL( fetchedPost( KBlog::BlogPost* ) ),
226
 
           this, SLOT( fetchPost( KBlog::BlogPost* ) ) );
 
225
  connect( b, SIGNAL(fetchedPost(KBlog::BlogPost*)),
 
226
           this, SLOT(fetchPost(KBlog::BlogPost*)) );
227
227
  p->setContent( "TestMetaWeblog: created content." );
228
228
  b->fetchPost( p );
229
229
  fetchPostTimer->start( TIMEOUT );
238
238
  QVERIFY( post->status() == BlogPost::Fetched );
239
239
//   QVERIFY( post->content() == mModifiedContent );
240
240
 
241
 
  connect( b, SIGNAL( removedPost( KBlog::BlogPost* ) ),
242
 
           this, SLOT( removePost( KBlog::BlogPost* ) ) );
 
241
  connect( b, SIGNAL(removedPost(KBlog::BlogPost*)),
 
242
           this, SLOT(removePost(KBlog::BlogPost*)) );
243
243
  b->removePost( p );
244
244
  removePostTimer->start( TIMEOUT );
245
245
}
368
368
  QVERIFY( m->data() == QString( "YTM0NZomIzI2OTsmIzM0NTueYQ==" ).toAscii() );
369
369
  QVERIFY( m->name() == QString( "testmetaweblog.txt" ) );
370
370
 
371
 
  connect( b, SIGNAL( errorPost( KBlog::Blog::ErrorType, const QString&, KBlog::BlogPost* ) ),
372
 
           this, SLOT( errorPost( KBlog::Blog::ErrorType, const QString&, KBlog::BlogPost* ) ) );
 
371
  connect( b, SIGNAL(errorPost(KBlog::Blog::ErrorType,QString,KBlog::BlogPost*)),
 
372
           this, SLOT(errorPost(KBlog::Blog::ErrorType,QString,KBlog::BlogPost*)) );
373
373
 
374
374
  TestMetaWeblogWarnings *warnings = new TestMetaWeblogWarnings();
375
375
 
376
376
  fetchUserInfoTimer = new QTimer( this );
377
377
  fetchUserInfoTimer->setSingleShot( true );
378
 
  connect( fetchUserInfoTimer, SIGNAL( timeout() ),
379
 
           warnings, SLOT( fetchUserInfoTimeoutWarning() ) );
 
378
  connect( fetchUserInfoTimer, SIGNAL(timeout()),
 
379
           warnings, SLOT(fetchUserInfoTimeoutWarning()) );
380
380
 
381
381
  listBlogsTimer = new QTimer( this );
382
382
  listBlogsTimer->setSingleShot( true );
383
 
  connect( listBlogsTimer, SIGNAL( timeout() ),
384
 
           warnings, SLOT( listBlogsTimeoutWarning() ) );
 
383
  connect( listBlogsTimer, SIGNAL(timeout()),
 
384
           warnings, SLOT(listBlogsTimeoutWarning()) );
385
385
 
386
386
  listRecentPostsTimer = new QTimer( this );
387
387
  listRecentPostsTimer->setSingleShot( true );
388
 
  connect( listRecentPostsTimer, SIGNAL( timeout() ),
389
 
           warnings, SLOT( listRecentPostsTimeoutWarning() ) );
 
388
  connect( listRecentPostsTimer, SIGNAL(timeout()),
 
389
           warnings, SLOT(listRecentPostsTimeoutWarning()) );
390
390
 
391
391
  listCategoriesTimer = new QTimer( this );
392
392
  listCategoriesTimer->setSingleShot( true );
393
 
  connect( listCategoriesTimer, SIGNAL( timeout() ),
394
 
           warnings, SLOT( listCategoriesTimeoutWarning() ) );
 
393
  connect( listCategoriesTimer, SIGNAL(timeout()),
 
394
           warnings, SLOT(listCategoriesTimeoutWarning()) );
395
395
 
396
396
  fetchPostTimer = new QTimer( this );
397
397
  fetchPostTimer->setSingleShot( true );
398
 
  connect( fetchPostTimer, SIGNAL( timeout() ),
399
 
           warnings, SLOT( fetchPostTimeoutWarning() ) );
 
398
  connect( fetchPostTimer, SIGNAL(timeout()),
 
399
           warnings, SLOT(fetchPostTimeoutWarning()) );
400
400
 
401
401
  modifyPostTimer = new QTimer( this );
402
402
  modifyPostTimer->setSingleShot( true );
403
 
  connect( modifyPostTimer, SIGNAL( timeout() ),
404
 
           warnings, SLOT( modifyPostTimeoutWarning() ) );
 
403
  connect( modifyPostTimer, SIGNAL(timeout()),
 
404
           warnings, SLOT(modifyPostTimeoutWarning()) );
405
405
 
406
406
  createPostTimer = new QTimer( this );
407
407
  createPostTimer->setSingleShot( true );
408
 
  connect( createPostTimer, SIGNAL( timeout() ),
409
 
           warnings, SLOT( createPostTimeoutWarning() ) );
 
408
  connect( createPostTimer, SIGNAL(timeout()),
 
409
           warnings, SLOT(createPostTimeoutWarning()) );
410
410
 
411
411
  removePostTimer = new QTimer( this );
412
412
  removePostTimer->setSingleShot( true );
413
 
  connect( removePostTimer, SIGNAL( timeout() ),
414
 
           warnings, SLOT( removePostTimeoutWarning() ) );
 
413
  connect( removePostTimer, SIGNAL(timeout()),
 
414
           warnings, SLOT(removePostTimeoutWarning()) );
415
415
 
416
416
  // start the chain
417
 
  connect( b, SIGNAL( fetchedUserInfo( const QMap<QString,QString>& ) ),
418
 
          this, SLOT( fetchUserInfo( const QMap<QString,QString>&) ) );
 
417
  connect( b, SIGNAL(fetchedUserInfo(QMap<QString,QString>)),
 
418
          this, SLOT(fetchUserInfo(QMap<QString,QString>)) );
419
419
  b->fetchUserInfo();
420
420
  fetchUserInfoTimer->start( TIMEOUT );
421
421