summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp7
-rw-r--r--core/launcher/qprocess_unix.cpp6
-rw-r--r--core/launcher/server.cpp13
-rw-r--r--core/settings/launcher/menusettings.cpp5
-rw-r--r--core/settings/launcher/taskbarsettings.cpp13
5 files changed, 32 insertions, 12 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 759e440..61beac5 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -667,7 +667,9 @@ void TextEdit::openDotFile( const QString &f ) {
odebug << "openFile dotfile " + currentFileName << oendl;
QString txt;
QFile file(f);
- file.open(IO_ReadWrite);
+ if (!file.open(IO_ReadWrite))
+ owarn << "Failed to open file " << file.name() << oendl;
+ else {
QTextStream t(&file);
while ( !t.atEnd()) {
txt+=t.readLine()+"\n";
@@ -676,8 +678,7 @@ void TextEdit::openDotFile( const QString &f ) {
editor->setEdited( false);
edited1=false;
edited=false;
-
-
+ }
}
updateCaption( currentFileName);
}
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index 97c0460..3125bcc 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -313,7 +313,11 @@ void QProcessManager::removeMe()
void QProcessManager::sigchldHnd( int fd )
{
char tmp;
- ::read( fd, &tmp, sizeof(tmp) );
+ if (::read( fd, &tmp, sizeof(tmp) ) < 0)
+#if defined(QT_QPROCESS_DEBUG)
+ odebug << "QProcessManager::sigchldHnd() failed dummy read of file descriptor" << oendl;
+#endif
+ ;
#if defined(QT_QPROCESS_DEBUG)
odebug << "QProcessManager::sigchldHnd()" << oendl;
#endif
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
@@ -367,16 +367,24 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
} 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();
}
+ if ( fileWasCreated ) {
QRsync::applyDiff( baseFile, deltaFile );
#ifndef QT_NO_COP
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;
@@ -998,7 +1006,8 @@ void Server::startSoundServer() {
process->clearArguments();
*process << QPEApplication::qpeDir() + "bin/qss";
- process->start();
+ if (!process->start())
+ owarn << "Sound server process did not start" << oendl;
}
void Server::soundServerExited() {
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 29ce841..d63b203 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -33,6 +33,7 @@ _;:, .> :=|. This file is free software; you can
#include <qpe/qpeapplication.h>
#include <qpe/menuappletinterface.h>
#include <qpe/qcopenvelope_qws.h>
+#include <opie2/odebug.h>
#include <qdir.h>
#include <qlistview.h>
@@ -94,7 +95,9 @@ void MenuSettings::init ( )
MenuAppletInterface *iface = 0;
QLibrary *lib = new QLibrary ( path + "/" + *it );
- lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface );
+ QRESULT retVal = QS_OK;
+ if ((retVal = lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**)(&iface) )) != QS_OK )
+ owarn << "queryInterface failed with " << retVal << oendl;
if ( iface ) {
QString lang = getenv( "LANG" );
QTranslator *trans = new QTranslator ( qApp );
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index 861ff3a..c2b82b9 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -91,7 +91,9 @@ void TaskbarSettings::init ( )
owarn << "Load applet: " << (*it) << "" << oendl;
QLibrary *lib = new QLibrary ( path + "/" + *it );
- lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface );
+ QRESULT retVal = QS_OK;
+ if ((retVal = lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**)(&iface) )) != QS_OK)
+ owarn << "<0>" << oendl;
owarn << "<1>" << oendl;
if ( iface ) {
owarn << "<2>" << oendl;
@@ -110,10 +112,11 @@ void TaskbarSettings::init ( )
owarn << "<3>" << oendl;
if ( !iface ) {
owarn << "<4>" << oendl;
- lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface );
+ if ((retVal = lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**)(&iface))) != QS_OK)
+ owarn << "<5>" << oendl;
if ( iface ) {
- owarn << "<5>" << oendl;
+ owarn << "<6>" << oendl;
name = (*it). mid ( 3 );
owarn << "Found applet: " << name << "" << oendl;
#ifdef Q_OS_MACX
@@ -130,10 +133,10 @@ void TaskbarSettings::init ( )
iface-> release ( );
}
}
- owarn << "<6>" << oendl;
+ owarn << "<7>" << oendl;
if ( iface ) {
- owarn << "<7>" << oendl;
+ owarn << "<8>" << oendl;
QCheckListItem *item;
item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
if ( !icon. isNull ( ))