summaryrefslogtreecommitdiff
path: root/core/launcher/server.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/server.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/server.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 921b790..c45265a 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -364,22 +364,30 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
QString baseFile, sigFile, deltaFile;
stream >> baseFile >> sigFile >> deltaFile;
QRsync::generateDiff( baseFile, sigFile, deltaFile );
} else if ( msg == "rdiffApplyPatch(QString,QString)" ) {
QString baseFile, deltaFile;
stream >> baseFile >> deltaFile;
+ bool fileWasCreated = false;
if ( !QFile::exists( baseFile ) ) {
QFile f( baseFile );
- f.open( IO_WriteOnly );
+ fileWasCreated = f.open( IO_WriteOnly );
f.close();
}
- QRsync::applyDiff( baseFile, deltaFile );
+ if ( fileWasCreated ) {
+ QRsync::applyDiff( baseFile, deltaFile );
#ifndef QT_NO_COP
- QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" );
- e << baseFile;
+ QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" );
+ e << baseFile;
#endif
+ } else {
+#ifndef QT_NO_COP
+ QCopEnvelope e( "QPE/Desktop", "patchUnapplied(QString)" );
+ e << baseFile;
+#endif
+ }
} else if ( msg == "rdiffCleanup()" ) {
mkdir( "/tmp/rdiff" );
QDir dir;
dir.setPath( "/tmp/rdiff" );
QStringList entries = dir.entryList();
for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
@@ -995,12 +1003,13 @@ void Server::startSoundServer() {
connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
SLOT(soundServerExited()));
}
process->clearArguments();
*process << QPEApplication::qpeDir() + "bin/qss";
- process->start();
+ if (!process->start())
+ owarn << "Sound server process did not start" << oendl;
}
void Server::soundServerExited() {
QTimer::singleShot(5000, this, SLOT(startSoundServer()));
}