summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp33
-rw-r--r--core/launcher/qprocess_unix.cpp6
-rw-r--r--core/launcher/server.cpp19
-rw-r--r--core/settings/launcher/menusettings.cpp5
-rw-r--r--core/settings/launcher/taskbarsettings.cpp13
-rw-r--r--libopie2/opiecore/oglobal.cpp2
-rw-r--r--libopie2/opiecore/oprocess.cpp2
-rw-r--r--library/global.cpp63
-rw-r--r--noncore/apps/advancedfm/output.cpp5
-rw-r--r--noncore/apps/tinykate/libkate/document/katebuffer.cpp5
-rw-r--r--noncore/settings/usermanager/userdialog.cpp9
11 files changed, 94 insertions, 68 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
@@ -664,18 +664,19 @@ void TextEdit::openDotFile( const QString &f ) {
664 if(!currentFileName.isEmpty()) { 664 if(!currentFileName.isEmpty()) {
665 currentFileName=f; 665 currentFileName=f;
666 666
667 odebug << "openFile dotfile " + currentFileName << oendl; 667 odebug << "openFile dotfile " + currentFileName << oendl;
668 QString txt; 668 QString txt;
669 QFile file(f); 669 QFile file(f);
670 file.open(IO_ReadWrite); 670 if (!file.open(IO_ReadWrite))
671 QTextStream t(&file); 671 owarn << "Failed to open file " << file.name() << oendl;
672 while ( !t.atEnd()) { 672 else {
673 txt+=t.readLine()+"\n"; 673 QTextStream t(&file);
674 } 674 while ( !t.atEnd()) {
675 editor->setText(txt); 675 txt+=t.readLine()+"\n";
676 editor->setEdited( false); 676 }
677 edited1=false; 677 editor->setText(txt);
678 edited=false; 678 editor->setEdited( false);
679 679 edited1=false;
680 680 edited=false;
681 }
681 } 682 }
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
@@ -315,3 +315,7 @@ void QProcessManager::sigchldHnd( int fd )
315 char tmp; 315 char tmp;
316 ::read( fd, &tmp, sizeof(tmp) ); 316 if (::read( fd, &tmp, sizeof(tmp) ) < 0)
317#if defined(QT_QPROCESS_DEBUG)
318 odebug << "QProcessManager::sigchldHnd() failed dummy read of file descriptor" << oendl;
319#endif
320 ;
317#if defined(QT_QPROCESS_DEBUG) 321#if defined(QT_QPROCESS_DEBUG)
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
@@ -369,12 +369,20 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
369 stream >> baseFile >> deltaFile; 369 stream >> baseFile >> deltaFile;
370 bool fileWasCreated = false;
370 if ( !QFile::exists( baseFile ) ) { 371 if ( !QFile::exists( baseFile ) ) {
371 QFile f( baseFile ); 372 QFile f( baseFile );
372 f.open( IO_WriteOnly ); 373 fileWasCreated = f.open( IO_WriteOnly );
373 f.close(); 374 f.close();
374 } 375 }
375 QRsync::applyDiff( baseFile, deltaFile ); 376 if ( fileWasCreated ) {
377 QRsync::applyDiff( baseFile, deltaFile );
376#ifndef QT_NO_COP 378#ifndef QT_NO_COP
377 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" ); 379 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" );
378 e << baseFile; 380 e << baseFile;
379#endif 381#endif
382 } else {
383#ifndef QT_NO_COP
384 QCopEnvelope e( "QPE/Desktop", "patchUnapplied(QString)" );
385 e << baseFile;
386#endif
387 }
380 } else if ( msg == "rdiffCleanup()" ) { 388 } else if ( msg == "rdiffCleanup()" ) {
@@ -1000,3 +1008,4 @@ void Server::startSoundServer() {
1000 *process << QPEApplication::qpeDir() + "bin/qss"; 1008 *process << QPEApplication::qpeDir() + "bin/qss";
1001 process->start(); 1009 if (!process->start())
1010 owarn << "Sound server process did not start" << oendl;
1002} 1011}
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
@@ -35,2 +35,3 @@ _;:, .> :=|. This file is free software; you can
35#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
36#include <opie2/odebug.h>
36 37
@@ -96,3 +97,5 @@ void MenuSettings::init ( )
96 QLibrary *lib = new QLibrary ( path + "/" + *it ); 97 QLibrary *lib = new QLibrary ( path + "/" + *it );
97 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); 98 QRESULT retVal = QS_OK;
99 if ((retVal = lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**)(&iface) )) != QS_OK )
100 owarn << "queryInterface failed with " << retVal << oendl;
98 if ( iface ) { 101 if ( iface ) {
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
@@ -93,3 +93,5 @@ void TaskbarSettings::init ( )
93 QLibrary *lib = new QLibrary ( path + "/" + *it ); 93 QLibrary *lib = new QLibrary ( path + "/" + *it );
94 lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); 94 QRESULT retVal = QS_OK;
95 if ((retVal = lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**)(&iface) )) != QS_OK)
96 owarn << "<0>" << oendl;
95 owarn << "<1>" << oendl; 97 owarn << "<1>" << oendl;
@@ -112,6 +114,7 @@ void TaskbarSettings::init ( )
112 owarn << "<4>" << oendl; 114 owarn << "<4>" << oendl;
113 lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); 115 if ((retVal = lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**)(&iface))) != QS_OK)
116 owarn << "<5>" << oendl;
114 117
115 if ( iface ) { 118 if ( iface ) {
116 owarn << "<5>" << oendl; 119 owarn << "<6>" << oendl;
117 name = (*it). mid ( 3 ); 120 name = (*it). mid ( 3 );
@@ -132,6 +135,6 @@ void TaskbarSettings::init ( )
132 } 135 }
133 owarn << "<6>" << oendl; 136 owarn << "<7>" << oendl;
134 137
135 if ( iface ) { 138 if ( iface ) {
136 owarn << "<7>" << oendl; 139 owarn << "<8>" << oendl;
137 QCheckListItem *item; 140 QCheckListItem *item;
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp
index 706ac6c..b7d59fc 100644
--- a/libopie2/opiecore/oglobal.cpp
+++ b/libopie2/opiecore/oglobal.cpp
@@ -346,3 +346,3 @@ bool OGlobal::isDocumentFileName( const QString& file )
346 } 346 }
347 if (file.startsWith(homeDirPath())+"/Documents/") return true; 347 if (file.startsWith(homeDirPath()+"/Documents/")) return true;
348 return false; 348 return false;
diff --git a/libopie2/opiecore/oprocess.cpp b/libopie2/opiecore/oprocess.cpp
index b3f9724..56f9883 100644
--- a/libopie2/opiecore/oprocess.cpp
+++ b/libopie2/opiecore/oprocess.cpp
@@ -930,3 +930,3 @@ int OProcess::processPID( const QString& process )
930 QFile file( "/proc/"+*it+"/cmdline" ); 930 QFile file( "/proc/"+*it+"/cmdline" );
931 file.open( IO_ReadOnly ); 931 if ( !file.open( IO_ReadOnly ) ) continue;
932 if ( !file.isOpen() ) continue; 932 if ( !file.isOpen() ) continue;
diff --git a/library/global.cpp b/library/global.cpp
index f7a0767..7bdd0b1 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -218,35 +218,34 @@ const QDawg& Global::fixedDawg()
218 if ( !fixed_dawg ) { 218 if ( !fixed_dawg ) {
219 if ( !docDirCreated ) 219 if ( !docDirCreated )
220 createDocDir(); 220 createDocDir();
221 221
222 fixed_dawg = new QDawg; 222 fixed_dawg = new QDawg;
223 QString dawgfilename = dictDir() + "/dawg"; 223 QString dawgfilename = dictDir() + "/dawg";
224 QString words_lang; 224 QString words_lang;
225 QStringList langs = Global::languageList(); 225 QStringList langs = Global::languageList();
226 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { 226 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
227 QString lang = *it; 227 QString lang = *it;
228 words_lang = dictDir() + "/words." + lang; 228 words_lang = dictDir() + "/words." + lang;
229 QString dawgfilename_lang = dawgfilename + "." + lang; 229 QString dawgfilename_lang = dawgfilename + "." + lang;
230 if ( QFile::exists(dawgfilename_lang) || 230 if ( QFile::exists(dawgfilename_lang) ||
231 QFile::exists(words_lang) ) { 231 QFile::exists(words_lang) ) {
232 dawgfilename = dawgfilename_lang; 232 dawgfilename = dawgfilename_lang;
233 break; 233 break;
234 } 234 }
235 }
236 QFile dawgfile(dawgfilename);
237
238 if ( !dawgfile.exists() ) {
239 QString fn = dictDir() + "/words";
240 if ( QFile::exists(words_lang) )
241 fn = words_lang;
242 QFile in(fn);
243 if ( in.open(IO_ReadOnly) ) {
244 fixed_dawg->createFromWords(&in);
245 dawgfile.open(IO_WriteOnly);
246 fixed_dawg->write(&dawgfile);
247 dawgfile.close();
248 } 235 }
249 } else { 236 QFile dawgfile(dawgfilename);
250 fixed_dawg->readFile(dawgfilename); 237
251 } 238 if ( !dawgfile.exists() ) {
239 QString fn = dictDir() + "/words";
240 if ( QFile::exists(words_lang) )
241 fn = words_lang;
242 QFile in(fn);
243 if ( in.open(IO_ReadOnly) ) {
244 fixed_dawg->createFromWords(&in);
245 if (dawgfile.open(IO_WriteOnly))
246 fixed_dawg->write(&dawgfile);
247 dawgfile.close();
248 }
249 } else
250 fixed_dawg->readFile(dawgfilename);
252 } 251 }
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index 8c585f4..8f654d5 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -194,4 +194,5 @@ void Output::saveOutput() {
194 QFile f(filename); 194 QFile f(filename);
195 f.open( IO_WriteOnly); 195 if ( !f.open( IO_WriteOnly ) )
196 if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) { 196 owarn << "Could no open file" << oendl;
197 else if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) {
197 DocLnk lnk; 198 DocLnk lnk;
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
index 4c15fd0..d89edbd 100644
--- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp
+++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
@@ -74,3 +74,6 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec)
74 QFile iofile(file); 74 QFile iofile(file);
75 iofile.open(IO_ReadOnly); 75 if (!iofile.open(IO_ReadOnly)) {
76 owarn << "failed to open file " << iofile.name() << oendl;
77 return;
78 }
76 QTextStream stream(&iofile); 79 QTextStream stream(&iofile);
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp
index 3654639..75a96a6 100644
--- a/noncore/settings/usermanager/userdialog.cpp
+++ b/noncore/settings/usermanager/userdialog.cpp
@@ -244,5 +244,8 @@ bool UserDialog::addUser(int uid, int gid)
244 { 244 {
245 accounts->findGroup(adduserDialog->groupComboBox->currentText()); 245 // making the call findGroup() puts the group info in the accounts gr_gid
246 adduserDialog->groupID=accounts->gr_gid; 246 if (accounts->findGroup(adduserDialog->groupComboBox->currentText()))
247 owarn << QString::number(accounts->gr_gid) << oendl; 247 {
248 adduserDialog->groupID=accounts->gr_gid;
249 owarn << QString::number(accounts->gr_gid) << oendl;
250 }
248 } 251 }