summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -41,6 +41,8 @@
#include <opie2/odebug.h>
#include <opie2/odevicebutton.h>
#include <opie2/odevice.h>
+#include <opie2/oprocess.h>
+
#include <qtopia/applnk.h>
#include <qtopia/private/categories.h>
#include <qtopia/mimetype.h>
@@ -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()));
+}
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
@@ -41,6 +41,7 @@ class QueuedRequestRunner;
namespace Opie {
namespace Core {
class ODeviceButton;
+ class OProcess;
}
}
@@ -63,6 +64,10 @@ public slots:
void pokeTimeMonitors();
private slots:
+ //@{
+ void startSoundServer();
+ void soundServerExited();
+ //@}
void activate(const Opie::Core::ODeviceButton*,bool);
void syncConnectionClosed( const QHostAddress & );
void applicationLaunched(int pid, const QString &app);
@@ -104,6 +109,8 @@ private:
int pendingFlushes;
bool directAccessRun;
QueuedRequestRunner *qrr;
+
+ Opie::Core::OProcess *process;
};