src/documentmanager.cpp

changeset 259
c27612f0eac0
parent 235
7ef03c2b46ab
child 262
dc33f8a707c4
equal deleted inserted replaced
258:fe094d0687ad 259:c27612f0eac0
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);

mercurial