-rw-r--r-- | core/apps/textedit/textedit.cpp | 33 | ||||
-rw-r--r-- | core/launcher/qprocess_unix.cpp | 6 | ||||
-rw-r--r-- | core/launcher/server.cpp | 19 | ||||
-rw-r--r-- | core/settings/launcher/menusettings.cpp | 5 | ||||
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 13 | ||||
-rw-r--r-- | libopie2/opiecore/oglobal.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/oprocess.cpp | 2 | ||||
-rw-r--r-- | library/global.cpp | 63 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katebuffer.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/usermanager/userdialog.cpp | 9 |
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 | |||
@@ -659,28 +659,29 @@ void TextEdit::newFile( const DocLnk &f ) { | |||
659 | updateCaption( currentFileName); | 659 | updateCaption( currentFileName); |
660 | // editor->setEdited( false); | 660 | // editor->setEdited( false); |
661 | } | 661 | } |
662 | 662 | ||
663 | void TextEdit::openDotFile( const QString &f ) { | 663 | 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 | } |
682 | updateCaption( currentFileName); | 683 | updateCaption( currentFileName); |
683 | } | 684 | } |
684 | 685 | ||
685 | void TextEdit::openFile( const QString &f ) { | 686 | void TextEdit::openFile( const QString &f ) { |
686 | odebug << "filename is "+ f << oendl; | 687 | odebug << "filename is "+ f << oendl; |
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 | |||
@@ -310,13 +310,17 @@ void QProcessManager::removeMe() | |||
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
313 | void QProcessManager::sigchldHnd( int fd ) | 313 | void QProcessManager::sigchldHnd( int fd ) |
314 | { | 314 | { |
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) |
318 | odebug << "QProcessManager::sigchldHnd()" << oendl; | 322 | odebug << "QProcessManager::sigchldHnd()" << oendl; |
319 | #endif | 323 | #endif |
320 | QProc *proc; | 324 | QProc *proc; |
321 | QProcess *process; | 325 | QProcess *process; |
322 | bool removeProc; | 326 | bool removeProc; |
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) | |||
364 | QString baseFile, sigFile, deltaFile; | 364 | QString baseFile, sigFile, deltaFile; |
365 | stream >> baseFile >> sigFile >> deltaFile; | 365 | stream >> baseFile >> sigFile >> deltaFile; |
366 | QRsync::generateDiff( baseFile, sigFile, deltaFile ); | 366 | QRsync::generateDiff( baseFile, sigFile, deltaFile ); |
367 | } else if ( msg == "rdiffApplyPatch(QString,QString)" ) { | 367 | } else if ( msg == "rdiffApplyPatch(QString,QString)" ) { |
368 | QString baseFile, deltaFile; | 368 | QString baseFile, deltaFile; |
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()" ) { |
381 | mkdir( "/tmp/rdiff" ); | 389 | mkdir( "/tmp/rdiff" ); |
382 | QDir dir; | 390 | QDir dir; |
383 | dir.setPath( "/tmp/rdiff" ); | 391 | dir.setPath( "/tmp/rdiff" ); |
384 | QStringList entries = dir.entryList(); | 392 | QStringList entries = dir.entryList(); |
385 | for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) | 393 | for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) |
@@ -995,12 +1003,13 @@ void Server::startSoundServer() { | |||
995 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), | 1003 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), |
996 | SLOT(soundServerExited())); | 1004 | SLOT(soundServerExited())); |
997 | } | 1005 | } |
998 | 1006 | ||
999 | process->clearArguments(); | 1007 | process->clearArguments(); |
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 | } |
1003 | 1012 | ||
1004 | void Server::soundServerExited() { | 1013 | void Server::soundServerExited() { |
1005 | QTimer::singleShot(5000, this, SLOT(startSoundServer())); | 1014 | QTimer::singleShot(5000, this, SLOT(startSoundServer())); |
1006 | } | 1015 | } |
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 | |||
@@ -30,12 +30,13 @@ _;:, .> :=|. This file is free software; you can | |||
30 | 30 | ||
31 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 32 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/menuappletinterface.h> | 34 | #include <qpe/menuappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
36 | #include <opie2/odebug.h> | ||
36 | 37 | ||
37 | #include <qdir.h> | 38 | #include <qdir.h> |
38 | #include <qlistview.h> | 39 | #include <qlistview.h> |
39 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
40 | #include <qheader.h> | 41 | #include <qheader.h> |
41 | #include <qlayout.h> | 42 | #include <qlayout.h> |
@@ -91,13 +92,15 @@ void MenuSettings::init ( ) | |||
91 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 92 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
92 | QString name; | 93 | QString name; |
93 | QPixmap icon; | 94 | QPixmap icon; |
94 | MenuAppletInterface *iface = 0; | 95 | MenuAppletInterface *iface = 0; |
95 | 96 | ||
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 ) { |
99 | QString lang = getenv( "LANG" ); | 102 | QString lang = getenv( "LANG" ); |
100 | QTranslator *trans = new QTranslator ( qApp ); | 103 | QTranslator *trans = new QTranslator ( qApp ); |
101 | QString type = (*it). left ((*it). find (".")); | 104 | QString type = (*it). left ((*it). find (".")); |
102 | QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm"; | 105 | QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm"; |
103 | if ( trans-> load ( tfn )) | 106 | if ( trans-> load ( tfn )) |
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 | |||
@@ -88,13 +88,15 @@ void TaskbarSettings::init ( ) | |||
88 | QString name; | 88 | QString name; |
89 | QPixmap icon; | 89 | QPixmap icon; |
90 | TaskbarNamedAppletInterface *iface = 0; | 90 | TaskbarNamedAppletInterface *iface = 0; |
91 | 91 | ||
92 | owarn << "Load applet: " << (*it) << "" << oendl; | 92 | owarn << "Load applet: " << (*it) << "" << oendl; |
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; |
96 | if ( iface ) { | 98 | if ( iface ) { |
97 | owarn << "<2>" << oendl; | 99 | owarn << "<2>" << oendl; |
98 | QString lang = getenv( "LANG" ); | 100 | QString lang = getenv( "LANG" ); |
99 | QTranslator *trans = new QTranslator ( qApp ); | 101 | QTranslator *trans = new QTranslator ( qApp ); |
100 | QString type = (*it). left ((*it). find (".")); | 102 | QString type = (*it). left ((*it). find (".")); |
@@ -107,16 +109,17 @@ void TaskbarSettings::init ( ) | |||
107 | icon = iface-> icon ( ); | 109 | icon = iface-> icon ( ); |
108 | iface-> release ( ); | 110 | iface-> release ( ); |
109 | } | 111 | } |
110 | owarn << "<3>" << oendl; | 112 | owarn << "<3>" << oendl; |
111 | if ( !iface ) { | 113 | if ( !iface ) { |
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 ); |
118 | owarn << "Found applet: " << name << "" << oendl; | 121 | owarn << "Found applet: " << name << "" << oendl; |
119 | #ifdef Q_OS_MACX | 122 | #ifdef Q_OS_MACX |
120 | int sep = name. find( ".dylib" ); | 123 | int sep = name. find( ".dylib" ); |
121 | #else | 124 | #else |
122 | int sep = name. find( ".so" ); | 125 | int sep = name. find( ".so" ); |
@@ -127,16 +130,16 @@ void TaskbarSettings::init ( ) | |||
127 | if ( sep == (int) name.length ( ) - 6 ) | 130 | if ( sep == (int) name.length ( ) - 6 ) |
128 | name. truncate ( sep ); | 131 | name. truncate ( sep ); |
129 | name[0] = name[0]. upper ( ); | 132 | name[0] = name[0]. upper ( ); |
130 | iface-> release ( ); | 133 | iface-> release ( ); |
131 | } | 134 | } |
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; |
138 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 141 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
139 | if ( !icon. isNull ( )) | 142 | if ( !icon. isNull ( )) |
140 | item-> setPixmap ( 0, icon ); | 143 | item-> setPixmap ( 0, icon ); |
141 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 144 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
142 | m_applets [*it] = item; | 145 | m_applets [*it] = 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 | |||
@@ -341,13 +341,13 @@ bool OGlobal::isDocumentFileName( const QString& file ) | |||
341 | QList< FileSystem > fl = si.fileSystems(); | 341 | QList< FileSystem > fl = si.fileSystems(); |
342 | FileSystem*fs; | 342 | FileSystem*fs; |
343 | for (fs = fl.first();fs!=0;fs=fl.next()) { | 343 | for (fs = fl.first();fs!=0;fs=fl.next()) { |
344 | if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) | 344 | if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) |
345 | return true; | 345 | return true; |
346 | } | 346 | } |
347 | if (file.startsWith(homeDirPath())+"/Documents/") return true; | 347 | if (file.startsWith(homeDirPath()+"/Documents/")) return true; |
348 | return false; | 348 | return false; |
349 | } | 349 | } |
350 | 350 | ||
351 | QString OGlobal::tempDirPath() | 351 | QString OGlobal::tempDirPath() |
352 | { | 352 | { |
353 | static QString defstring="/tmp"; | 353 | static QString defstring="/tmp"; |
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 | |||
@@ -925,13 +925,13 @@ int OProcess::processPID( const QString& process ) | |||
925 | QStringList dirs = d.entryList( QDir::Dirs ); | 925 | QStringList dirs = d.entryList( QDir::Dirs ); |
926 | QStringList::Iterator it; | 926 | QStringList::Iterator it; |
927 | for ( it = dirs.begin(); it != dirs.end(); ++it ) | 927 | for ( it = dirs.begin(); it != dirs.end(); ++it ) |
928 | { | 928 | { |
929 | //qDebug( "next entry: %s", (const char*) *it ); | 929 | //qDebug( "next entry: %s", (const char*) *it ); |
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; |
933 | QTextStream t( &file ); | 933 | QTextStream t( &file ); |
934 | line = t.readLine(); | 934 | line = t.readLine(); |
935 | //qDebug( "cmdline = %s", (const char*) line ); | 935 | //qDebug( "cmdline = %s", (const char*) line ); |
936 | if ( line.contains( process ) ) break; //FIXME: That may find also other process, if the name is not long enough ;) | 936 | if ( line.contains( process ) ) break; //FIXME: That may find also other process, if the name is not long enough ;) |
937 | } | 937 | } |
diff --git a/library/global.cpp b/library/global.cpp index f7a0767..7bdd0b1 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -213,45 +213,44 @@ Global::Global() | |||
213 | 213 | ||
214 | \sa addedDawg() | 214 | \sa addedDawg() |
215 | */ | 215 | */ |
216 | const QDawg& Global::fixedDawg() | 216 | const QDawg& Global::fixedDawg() |
217 | { | 217 | { |
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 | } |
253 | 252 | ||
254 | return *fixed_dawg; | 253 | return *fixed_dawg; |
255 | } | 254 | } |
256 | 255 | ||
257 | /*! | 256 | /*! |
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 | |||
@@ -189,14 +189,15 @@ void Output::saveOutput() { | |||
189 | filename+="/"; | 189 | filename+="/"; |
190 | QString name = fileDlg->LineEdit1->text(); | 190 | QString name = fileDlg->LineEdit1->text(); |
191 | filename+="text/plain/"+name; | 191 | filename+="text/plain/"+name; |
192 | odebug << filename << oendl; | 192 | odebug << filename << oendl; |
193 | 193 | ||
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; |
198 | lnk.setName(name); //sets file name | 199 | lnk.setName(name); //sets file name |
199 | lnk.setFile(filename); //sets File property | 200 | lnk.setFile(filename); //sets File property |
200 | lnk.setType("text/plain"); | 201 | lnk.setType("text/plain"); |
201 | if(!lnk.writeLink()) { | 202 | if(!lnk.writeLink()) { |
202 | odebug << "Writing doclink did not work" << oendl; | 203 | odebug << "Writing doclink did not work" << oendl; |
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 | |||
@@ -69,13 +69,16 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) | |||
69 | if (line) { | 69 | if (line) { |
70 | odebug << "insert File only supports insertion at line 0 == file opening" << oendl; | 70 | odebug << "insert File only supports insertion at line 0 == file opening" << oendl; |
71 | return; | 71 | return; |
72 | } | 72 | } |
73 | clear(); | 73 | clear(); |
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); |
77 | stream.setCodec(codec); | 80 | stream.setCodec(codec); |
78 | QString qsl; | 81 | QString qsl; |
79 | int count=0; | 82 | int count=0; |
80 | for (count=0;((qsl=stream.readLine())!=QString::null); count++) | 83 | for (count=0;((qsl=stream.readLine())!=QString::null); count++) |
81 | { | 84 | { |
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 | |||
@@ -239,15 +239,18 @@ bool UserDialog::addUser(int uid, int gid) | |||
239 | } | 239 | } |
240 | } | 240 | } |
241 | // Show the dialog! | 241 | // Show the dialog! |
242 | if(!(adduserDialog->exec())) return false; | 242 | if(!(adduserDialog->exec())) return false; |
243 | if((adduserDialog->groupComboBox->currentItem()!=0)) | 243 | if((adduserDialog->groupComboBox->currentItem()!=0)) |
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 | } |
249 | if(!(accounts->addUser(adduserDialog->loginLineEdit->text(), adduserDialog->passwordLineEdit->text(), | 252 | if(!(accounts->addUser(adduserDialog->loginLineEdit->text(), adduserDialog->passwordLineEdit->text(), |
250 | adduserDialog->uidLineEdit->text().toInt(), adduserDialog->groupID, adduserDialog->gecosLineEdit->text(), | 253 | adduserDialog->uidLineEdit->text().toInt(), adduserDialog->groupID, adduserDialog->gecosLineEdit->text(), |
251 | QString("/home/")+adduserDialog->loginLineEdit->text() , adduserDialog->shellComboBox->currentText()))) | 254 | QString("/home/")+adduserDialog->loginLineEdit->text() , adduserDialog->shellComboBox->currentText()))) |
252 | { | 255 | { |
253 | QMessageBox::information(0,"Ooops!","Something went wrong!\nUnable to add user."); | 256 | QMessageBox::information(0,"Ooops!","Something went wrong!\nUnable to add user."); |