-rw-r--r-- | core/launcher/server.cpp | 127 |
1 files changed, 85 insertions, 42 deletions
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp index 5ae517b..3bef36e 100644 --- a/core/launcher/server.cpp +++ b/core/launcher/server.cpp @@ -234,3 +234,2 @@ void Server::activate(const ODeviceButton* button, bool held) - typedef struct KeyOverride { @@ -283,3 +282,2 @@ bool Server::setKeyboardLayout( const QString &kb ) } - #endif @@ -293,8 +291,10 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) transferServer->authorizeConnections(); + if ( qcopBridge ) qcopBridge->authorizeConnections(); - } - /* ### FIXME support TempScreenSaverMode */ + } else + #if 0 - else if ( msg == "setTempScreenSaverMode(int,int)" ) { + /* ### FIXME support TempScreenSaverMode */ + if ( msg == "setTempScreenSaverMode(int,int)" ) { int mode, pid; @@ -302,5 +302,6 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) tsmMonitor->setTempMode(mode, pid); - } + } else #endif - else if ( msg == "linkChanged(QString)" ) { + + if ( msg == "linkChanged(QString)" ) { QString link; @@ -309,5 +310,9 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) docList->linkChanged(link); - } else if ( msg == "serviceChanged(QString)" ) { + } else + + if ( msg == "serviceChanged(QString)" ) { MimeType::updateApplications(); - } else if ( msg == "mkdir(QString)" ) { + } else + + if ( msg == "mkdir(QString)" ) { QString dir; @@ -316,3 +321,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) mkdir( dir ); - } else if ( msg == "rdiffGenSig(QString,QString)" ) { + } else + + if ( msg == "rdiffGenSig(QString,QString)" ) { QString baseFile, sigFile; @@ -320,3 +327,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) QRsync::generateSignature( baseFile, sigFile ); - } else if ( msg == "rdiffGenDiff(QString,QString,QString)" ) { + } else + + if ( msg == "rdiffGenDiff(QString,QString,QString)" ) { QString baseFile, sigFile, deltaFile; @@ -324,3 +333,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) QRsync::generateDiff( baseFile, sigFile, deltaFile ); - } else if ( msg == "rdiffApplyPatch(QString,QString)" ) { + } else + + if ( msg == "rdiffApplyPatch(QString,QString)" ) { QString baseFile, deltaFile; @@ -337,3 +348,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) #endif - } else if ( msg == "rdiffCleanup()" ) { + } else + + if ( msg == "rdiffCleanup()" ) { mkdir( "/tmp/rdiff" ); @@ -344,3 +357,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) dir.remove( *it ); - } else if ( msg == "sendHandshakeInfo()" ) { + } else + + if ( msg == "sendHandshakeInfo()" ) { QString home = getenv( "HOME" ); @@ -352,4 +367,4 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) #endif + } else - } /* @@ -360,3 +375,3 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) */ - else if ( msg == "sendVersionInfo()" ) { + if ( msg == "sendVersionInfo()" ) { QCopEnvelope e( "QPE/Desktop", "versionInfo(QString,QString)" ); @@ -364,3 +379,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) e << QString::fromLatin1("1.7") << "Uncustomized Device"; - } else if ( msg == "sendCardInfo()" ) { + } else + + if ( msg == "sendCardInfo()" ) { #ifndef QT_NO_COP @@ -391,3 +408,2 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) s += homeFs; - #ifndef QT_NO_COP @@ -395,3 +411,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) #endif - } else if ( msg == "sendSyncDate(QString)" ) { + } else + + if ( msg == "sendSyncDate(QString)" ) { QString app; @@ -406,3 +424,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) // << cfg.readEntry( app ).latin1() << oendl; - } else if ( msg == "setSyncDate(QString,QString)" ) { + } else + + if ( msg == "setSyncDate(QString,QString)" ) { QString app, date; @@ -413,3 +433,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) //odebug << "setSyncDate(QString,QString) " << app << " " << date << "" << oendl; - } else if ( msg == "startSync(QString)" ) { + } else + + if ( msg == "startSync(QString)" ) { QString what; @@ -420,12 +442,19 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) connect( syncDialog, SIGNAL(cancel()), SLOT(cancelSync()) ); - } else if ( msg == "stopSync()") { + } else + + if ( msg == "stopSync()") { delete syncDialog; syncDialog = 0; - } else if (msg == "restoreDone(QString)") { + } else + + if (msg == "restoreDone(QString)") { docList->restoreDone(); - } else if ( msg == "getAllDocLinks()" ) { + } else + + if ( msg == "getAllDocLinks()" ) { docList->sendAllDocLinks(); - } + } else + #ifdef Q_WS_QWS - else if ( msg == "setMouseProto(QString)" ) { + if ( msg == "setMouseProto(QString)" ) { QString mice; @@ -434,3 +463,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) qwsServer->openMouse(); - } else if ( msg == "setKeyboard(QString)" ) { + } else + + if ( msg == "setKeyboard(QString)" ) { QString kb; @@ -439,4 +470,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) qwsServer->openKeyboard(); + } else - } else if ( msg == "setKeyboardAutoRepeat(int,int)" ) { + if ( msg == "setKeyboardAutoRepeat(int,int)" ) { int delay, period; @@ -448,3 +480,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) cfg.writeEntry( "RepeatPeriod", period ); - } else if ( msg == "setKeyboardLayout(QString)" ) { + } else + + if ( msg == "setKeyboardLayout(QString)" ) { QString kb; @@ -455,3 +489,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) cfg.writeEntry( "Layout", kb ); - } else if ( msg == "autoStart(QString)" ) { + } else + + if ( msg == "autoStart(QString)" ) { QString appName; @@ -463,3 +499,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) } - } else if ( msg == "autoStart(QString,QString)" ) { + } else + + if ( msg == "autoStart(QString,QString)" ) { QString modifier, appName; @@ -484,3 +522,5 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) // case the autostart feature should be delayed - } else if ( msg == "autoStart(QString,QString,QString)") { + } else + + if ( msg == "autoStart(QString,QString,QString)") { QString modifier, appName, delay; @@ -496,3 +536,2 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data) } - } else { } @@ -508,6 +547,9 @@ void Server::receiveTaskBar(const QCString &msg, const QByteArray &data) docList->reloadAppLnks(); - } else if ( msg == "soundAlarm()" ) { + } else + + if ( msg == "soundAlarm()" ) { ServerApplication::soundAlarm(); - } - else if ( msg == "setLed(int,bool)" ) { + } else + + if ( msg == "setLed(int,bool)" ) { int led, status; @@ -556,5 +598,5 @@ bool Server::mkdir(const QString &localPath) // no more seperators found, use the local path - if (dirIndex == -1) + if (dirIndex == -1) { checkedPath = localPath; - else { + } else { // the next directory to check @@ -598,2 +640,3 @@ void Server::startTransferServer() } + if ( !transferServer ) { @@ -607,6 +650,7 @@ void Server::startTransferServer() } - } - if ( !transferServer || !qcopBridge ) + + if ( !qcopBridge ) tid_xfer = startTimer( 2000 ); } +} @@ -619,4 +663,4 @@ void Server::timerEvent( QTimerEvent *e ) } - /* ### FIXME today startin */ #if 0 + /* ### FIXME today startin */ else if ( e->timerId() == tid_today ) { @@ -706,2 +750 @@ void Server::preloadApps() } - |