From 67ddc501f2a52c7f35ca4044fb0094e759a45d76 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 03 Mar 2005 21:01:18 +0000 Subject: Start and Restart the QSound-Server --- (limited to 'core/launcher/server.cpp') diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp index 15cd686..921b790 100644 --- a/core/launcher/server.cpp +++ b/core/launcher/server.cpp @@ -41,6 +41,8 @@ #include #include #include +#include + #include #include #include @@ -133,7 +135,8 @@ Server::Server() : qcopBridge( 0 ), transferServer( 0 ), packageHandler( 0 ), - syncDialog( 0 ) + syncDialog( 0 ), + process( 0 ) { Global::setBuiltinCommands(builtins); @@ -167,6 +170,8 @@ Server::Server() : this, SLOT(desktopMessage( const QCString &, const QByteArray & )) ); #endif + soundServerExited(); + // start services startTransferServer(); (void) new IrServer( this ); @@ -984,3 +989,18 @@ void Server::finishedQueuedRequests() } } +void Server::startSoundServer() { + if ( !process ) { + process = new Opie::Core::OProcess( this ); + connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), + SLOT(soundServerExited())); + } + + process->clearArguments(); + *process << QPEApplication::qpeDir() + "bin/qss"; + process->start(); +} + +void Server::soundServerExited() { + QTimer::singleShot(5000, this, SLOT(startSoundServer())); +} -- cgit v0.9.0.2