Доброго времени суток. Проблема такая, имеется функция Filtering_all_date() код:
QFile All_history("./History/All/history.his");
if(All_history.open(QFile::ReadOnly)){
QString write_new_line = All_history.readLine();
QString delete_First_Line = All_history.readAll();
QFile overWrite_History_Today("./History/Today/history.his");
if(overWrite_History_Today.open(QFile::ReadOnly)){
QString write = write_new_line;
write_new_line += overWrite_History_Today.readAll();
QFile Write_today_history("./History/Today/history.his");
if(Write_today_history.open(QFile::WriteOnly)){
QTextStream Write_text(&Write_today_history);
Write_text<<write_new_line;
QStringList lst;
lst<<delete_First_Line;
lst.removeAt(0);
foreach(QString str,lst){
delete_First_Line=str;
}
QFile OverWrite_File_AllHistory("./History/All/history.his");
if(OverWrite_File_AllHistory.open(QFile::WriteOnly)){
QTextStream text(&OverWrite_File_AllHistory);
text<<delete_First_Line;
}
Write_thismonth.close();
OverWrite_File_AllHistory.close();
All_history.close();
overWrite_History_Today.close();
}
}
}
int i;
for(i=0;i=10;i++){
Filtering_all_date()
}