Commit f3e6d01e authored by Johnny Jazeix's avatar Johnny Jazeix

Correction parce que les pingouins sous windows n'aiment pas le lapin

qui tourne...
parent 94af4745
......@@ -2,6 +2,10 @@
using namespace std;
ParserPaje::ParserPaje(){
_is_finished = false;
}
void ParserPaje::parse(string filename, Trace &trace){
_is_finished = false;
// If the file must have the extension .trace
......@@ -19,12 +23,11 @@ void ParserPaje::parse(string filename, Trace &trace){
static const string PERCENT = "%";
string event_identity_string;
unsigned int event_identity;
QApplication::processEvents();
while(!line.is_eof()) {
// For the rabbit, else it does not turn :(
QApplication::processEvents();
line.newline();
if(line.starts_with(PERCENT)) {
parserdefinition->store_definition(line);
......@@ -81,4 +84,3 @@ void ParserPaje::reinit_cursor() {
bool ParserPaje::is_end_of_parsing() const{
return _is_finished;
}
......@@ -35,7 +35,14 @@ class ParserPaje : public Parser{
private:
std::string _file_to_parse;
bool _is_finished;
public:
/*!
* \fn ParserPaje()
*/
ParserPaje();
/*!
* \fn parse(std::string filename, Trace &trace)
* \param filename : the name of the file to parse
......
......@@ -203,9 +203,6 @@ std::string *TokenSource::read_token() {
int TokenSource::get_size_loaded() {
if(_filesize == 0) {
return 1;
}
#ifdef WIN32
if (_file == NULL)
return 1;
......@@ -216,8 +213,11 @@ int TokenSource::get_size_loaded() {
if (_file.bad())
return 3;
return _file.tellg();
return (_file.tellg()*100.)/_file.size();
#else
if(_filesize == 0) {
return 1;
}
return (_cursor*100.0)/_filesize;
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment