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
@@ -38,12 +38,14 @@
#include "qrr.h"
/* OPIE */
#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>
#include <qtopia/config.h>
#include <qtopia/resource.h>
#include <qtopia/version.h>
@@ -130,13 +132,14 @@ extern const char *directAccessQueueFile();
Server::Server() :
QWidget( 0, 0, WStyle_Tool | WStyle_Customize ),
qcopBridge( 0 ),
transferServer( 0 ),
packageHandler( 0 ),
- syncDialog( 0 )
+ syncDialog( 0 ),
+ process( 0 )
{
Global::setBuiltinCommands(builtins);
tid_xfer = 0;
/* ### FIXME ### */
/* tid_today = startTimer(3600*2*1000);*/
@@ -164,12 +167,14 @@ Server::Server() :
#ifdef QPE_HAVE_DIRECT_ACCESS
QCopChannel *desktopChannel = new QCopChannel( "QPE/Desktop", this );
connect( desktopChannel, SIGNAL(received( const QCString &, const QByteArray & )),
this, SLOT(desktopMessage( const QCString &, const QByteArray & )) );
#endif
+ soundServerExited();
+
// start services
startTransferServer();
(void) new IrServer( this );
packageHandler = new PackageHandler( this );
connect(qApp, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)),
@@ -981,6 +986,21 @@ void Server::finishedQueuedRequests()
} else {
qrr->readyToDelete = TRUE;
QTimer::singleShot( 0, this, SLOT(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
@@ -38,12 +38,13 @@ class SyncDialog;
class DocumentList;
class ServerInterface;
class QueuedRequestRunner;
namespace Opie {
namespace Core {
class ODeviceButton;
+ class OProcess;
}
}
class Server : public QWidget {
Q_OBJECT
public:
@@ -60,12 +61,16 @@ public slots:
void systemMsg(const QCString &, const QByteArray &);
void receiveTaskBar(const QCString &msg, const QByteArray &data);
void terminateServers();
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);
void applicationTerminated(int pid, const QString &app);
void applicationConnected(const QString &app);
void storageChanged();
@@ -101,11 +106,13 @@ private:
DocumentList *docList;
ServerInterface *serverGui;
int pendingFlushes;
bool directAccessRun;
QueuedRequestRunner *qrr;
+
+ Opie::Core::OProcess *process;
};
#endif // DESKTOP_H