rem: } else { const QString message = receiver + '\n' + iCal; QByteArray msgArray = message.utf8(); f.writeBlock( msgArray, msgArray.size() ); f.close();
context:     bool saveFile( const QString& receiver, const QString& iCal,                   const QString& type ) const    {      QString location = locateLocal( "data", "korganizer/income." + type,                                      true );      QDir dir;      if ( !dir.exists( location ) ) dir.mkdir( location );      QString file;      do {        file = location + "/" + KApplication::randomString( 10 );      } while ( QFile::exists( file ) );      QFile f( file );      if ( !f.open( IO_WriteOnly ) ) {        KMessageBox::error( 0, i18n("Could not open file for writing:\n%1")                            .arg( file ) );        return false;      } else {        const QString message = receiver + '\n' + iCal;        QByteArray msgArray = message.utf8();        f.writeBlock( msgArray, msgArray.size() );        f.close();      }      return true;    }