src/parser.cpp

changeset 12
fe67489523b5
parent 8
44679e468ba9
child 13
6e838748867b
equal deleted inserted replaced
11:771168ee2c76 12:fe67489523b5
378 { 378 {
379 line = line.simplified(); 379 line = line.simplified();
380 try 380 try
381 { 381 {
382 const QStringList tokens = line.split(QRegExp{R"(\s+)"}); 382 const QStringList tokens = line.split(QRegExp{R"(\s+)"});
383 if (tokens.empty()) 383 if (tokens.empty() or tokens == QStringList{{""}})
384 { 384 {
385 return std::make_unique<modelobjects::Empty>(); 385 return std::make_unique<modelobjects::Empty>();
386 } 386 }
387 bool ok_code; 387 bool ok_code;
388 const int code = tokens[0].toInt(&ok_code); 388 const int code = tokens[0].toInt(&ok_code);

mercurial