What's wrong?
void XmlGenerator
::sourceWrite(QTextEdit* editor
){ if(!f
->open
(QIODevice::ReadWrite|QIODevice
::Truncate)) std::cout<<"f problem"<<std::endl;
std::cout<<"f problem"<<std::endl;
while(!(line=in.readLine()).isNull()){
if(!line.isEmpty()){
if(line.at(0).toLatin1() != '<'){
out<<line<<"\n";
editor->setPlainText(line)<<"\n";
}
}
}//while
out<<"END";
editor->setPlainText("END");
f->close();
file->close();
}
void XmlGenerator::sourceWrite(QTextEdit* editor){
if(!f->open(QIODevice::ReadWrite|QIODevice::Truncate))
std::cout<<"f problem"<<std::endl;
if(!file->open(QIODevice::ReadWrite))
std::cout<<"f problem"<<std::endl;
QTextStream in(file);
QTextStream out(f);
QString line;
while(!(line=in.readLine()).isNull()){
if(!line.isEmpty()){
if(line.at(0).toLatin1() != '<'){
out<<line<<"\n";
editor->setPlainText(line)<<"\n";
}
}
}//while
out<<"END";
editor->setPlainText("END");
f->close();
file->close();
}
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........
Bookmarks