From 32343107b30904806d02672955c57ed53d39fe79 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 19 Jan 2007 01:18:01 +0000 Subject: Every file in this commit has a change to check the return value of a call. --- (limited to 'noncore/apps/advancedfm') 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 -- cgit v0.9.0.2