-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katebuffer.cpp | 5 |
2 files changed, 7 insertions, 3 deletions
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 | |||
@@ -193,6 +193,7 @@ void Output::saveOutput() { | |||
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 |
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 | |||
@@ -73,5 +73,8 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) | |||
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); |