~ubuntu-branches/ubuntu/raring/kdepimlibs/raring-proposed

« back to all changes in this revision

Viewing changes to akonadi/tests/testrunner/setup.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-14 14:37:07 UTC
  • mfrom: (1.1.72)
  • Revision ID: package-import@ubuntu.com-20111214143707-nvfc00wnfayzn9ig
Tags: 4:4.7.90-0ubuntu1
* New upstream beta release
* Add packages libkalarmcal2 and libakonadi-notes4

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
                                QDBusConnection::ExportAdaptors );
187
187
  mInternalBus.registerObject( QLatin1String( "/" ), this, QDBusConnection::ExportScriptableSlots );
188
188
 
189
 
  connect( mInternalBus.interface(), SIGNAL( serviceOwnerChanged( QString, QString, QString ) ),
190
 
           this, SLOT( dbusNameOwnerChanged( QString, QString, QString ) ) );
 
189
  connect( mInternalBus.interface(), SIGNAL(serviceOwnerChanged(QString,QString,QString)),
 
190
           this, SLOT(dbusNameOwnerChanged(QString,QString,QString)) );
191
191
}
192
192
 
193
193
bool SetupTest::startAkonadiDaemon()
209
209
{
210
210
  if ( !mAkonadiDaemonProcess )
211
211
    return;
212
 
  disconnect( mAkonadiDaemonProcess, SIGNAL( finished(int) ), this, 0 );
 
212
  disconnect( mAkonadiDaemonProcess, SIGNAL(finished(int)), this, 0 );
213
213
  mAkonadiDaemonProcess->terminate();
214
214
  const bool finished = mAkonadiDaemonProcess->waitForFinished( 5000 );
215
215
  if ( !finished ) {
438
438
      shutdownHarder();
439
439
    } else {
440
440
      // safety timeout
441
 
      QTimer::singleShot( 30 * 1000, this, SLOT( shutdownHarder() ) );
 
441
      QTimer::singleShot( 30 * 1000, this, SLOT(shutdownHarder()) );
442
442
    }
443
443
    // in case we indirectly started KDE processes, stop those before we kill their D-Bus
444
444
    shutdownKde();
477
477
void SetupTest::restartAkonadiServer()
478
478
{
479
479
  kDebug();
480
 
  disconnect( mAkonadiDaemonProcess, SIGNAL( finished(int) ), this, 0 );
 
480
  disconnect( mAkonadiDaemonProcess, SIGNAL(finished(int)), this, 0 );
481
481
  QDBusInterface controlIface( QLatin1String( "org.freedesktop.Akonadi.Control" ), QLatin1String( "/ControlManager" ),
482
482
                              QLatin1String( "org.freedesktop.Akonadi.ControlManager" ), mInternalBus );
483
483
  QDBusReply<void> reply = controlIface.call( "shutdown" );