-rw-r--r-- | core/launcher/server.cpp | 22 | ||||
-rw-r--r-- | core/launcher/server.h | 7 |
2 files changed, 28 insertions, 1 deletions
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 @@ -43,2 +43,4 @@ #include <opie2/odevice.h> +#include <opie2/oprocess.h> + #include <qtopia/applnk.h> @@ -135,3 +137,4 @@ Server::Server() : packageHandler( 0 ), - syncDialog( 0 ) + syncDialog( 0 ), + process( 0 ) { @@ -169,2 +172,4 @@ Server::Server() : + soundServerExited(); + // start services @@ -986 +991,16 @@ 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())); +} diff --git a/core/launcher/server.h b/core/launcher/server.h index d71d68a..5b2f995 100644 --- a/core/launcher/server.h +++ b/core/launcher/server.h @@ -43,2 +43,3 @@ namespace Core { class ODeviceButton; + class OProcess; } @@ -65,2 +66,6 @@ public slots: private slots: + //@{ + void startSoundServer(); + void soundServerExited(); + //@} void activate(const Opie::Core::ODeviceButton*,bool); @@ -106,2 +111,4 @@ private: QueuedRequestRunner *qrr; + + Opie::Core::OProcess *process; }; |