summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-03 21:01:18 (UTC)
committer zecke <zecke>2005-03-03 21:01:18 (UTC)
commit67ddc501f2a52c7f35ca4044fb0094e759a45d76 (patch) (side-by-side diff)
tree7c863f306e6fb7c1aecfb2f8c1ff4a217bfefa1c
parent585c9fe0efbc0cf4037a79cac3b22ac38c08fec2 (diff)
downloadopie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.zip
opie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.tar.gz
opie-67ddc501f2a52c7f35ca4044fb0094e759a45d76.tar.bz2
Start and Restart the QSound-Server
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/server.cpp22
-rw-r--r--core/launcher/server.h7
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;
};