author | erik <erik> | 2007-01-19 01:18:01 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-19 01:18:01 (UTC) |
commit | 32343107b30904806d02672955c57ed53d39fe79 (patch) (side-by-side diff) | |
tree | 9114a0ea170e3adc807a2445b49360f1bfde9626 /noncore/apps/advancedfm | |
parent | ac0ce844e90a64247c0adb210e0a23021b011d57 (diff) | |
download | opie-32343107b30904806d02672955c57ed53d39fe79.zip opie-32343107b30904806d02672955c57ed53d39fe79.tar.gz opie-32343107b30904806d02672955c57ed53d39fe79.tar.bz2 |
Every file in this commit has a change to check the return value of a call.
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 5 |
1 files changed, 3 insertions, 2 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 @@ -192,8 +192,9 @@ void Output::saveOutput() { odebug << filename << oendl; QFile f(filename); - f.open( IO_WriteOnly); - if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) { + if ( !f.open( IO_WriteOnly ) ) + owarn << "Could no open file" << oendl; + else if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) { DocLnk lnk; lnk.setName(name); //sets file name lnk.setFile(filename); //sets File property |