What's wrong?

Qt Code:
  1. void XmlGenerator::sourceWrite(QTextEdit* editor){
  2. if(!f->open(QIODevice::ReadWrite|QIODevice::Truncate))
  3. std::cout<<"f problem"<<std::endl;
  4.  
  5. if(!file->open(QIODevice::ReadWrite))
  6. std::cout<<"f problem"<<std::endl;
  7.  
  8. QTextStream in(file);
  9. QTextStream out(f);
  10. QString line;
  11. while(!(line=in.readLine()).isNull()){
  12. if(!line.isEmpty()){
  13. if(line.at(0).toLatin1() != '<'){
  14. out<<line<<"\n";
  15. editor->setPlainText(line)<<"\n";
  16. }
  17. }
  18. }//while
  19. out<<"END";
  20. editor->setPlainText("END");
  21. f->close();
  22. file->close();
  23. }
To copy to clipboard, switch view to plain text mode 

If I put a comment on line number 15, it compiles without any error, so i think that line is the problem........