115 const QString& path, |
115 const QString& path, |
116 QTextStream& errorStream, |
116 QTextStream& errorStream, |
117 const OpenType openType |
117 const OpenType openType |
118 ) { |
118 ) { |
119 QFile file{path}; |
119 QFile file{path}; |
120 const QString name = pathToName(path); |
120 const QString name = pathToName(QFileInfo{path}); |
121 file.open(QFile::ReadOnly | QFile::Text); |
121 file.open(QFile::ReadOnly | QFile::Text); |
122 std::unique_ptr<Model> newModel = std::make_unique<Model>(nullptr); |
122 std::unique_ptr<Model> newModel = std::make_unique<Model>(nullptr); |
123 QTextStream textStream{&file}; |
123 QTextStream textStream{&file}; |
124 Parser parser{file}; |
124 Parser parser{file}; |
125 parser.parseBody(*newModel); |
125 parser.parseBody(*newModel); |