111 |
111 |
112 // Trim the trailing newline |
112 // Trim the trailing newline |
113 while (line.endsWith ("\n") or line.endsWith ("\r")) |
113 while (line.endsWith ("\n") or line.endsWith ("\r")) |
114 line.chop (1); |
114 line.chop (1); |
115 |
115 |
116 LDObject* obj = _model->addFromString(line); |
116 LDObject* obj = _model->appendFromString(line); |
117 |
117 |
118 // Check for parse errors and warn about them |
118 // Check for parse errors and warn about them |
119 if (obj->type() == LDObjectType::Error) |
119 if (obj->type() == LDObjectType::Error) |
120 { |
120 { |
121 emit parseErrorMessage(format(tr("Couldn't parse line #%1: %2"), progress() + 1, static_cast<LDError*> (obj)->reason())); |
121 emit parseErrorMessage(format(tr("Couldn't parse line #%1: %2"), progress() + 1, static_cast<LDError*> (obj)->reason())); |