src/model.cpp

changeset 340
e17e07661f4c
parent 338
719b909a7d2b
child 374
75efc3ba5a56
equal deleted inserted replaced
339:4787d05e9c89 340:e17e07661f4c
173 if (it != map.end()) { 173 if (it != map.end()) {
174 map.erase(it); 174 map.erase(it);
175 } 175 }
176 } 176 }
177 177
178 void save(const Model &model, QTextStream* stream)
179 {
180 *stream << model.toPlainText();
181 }
182
183 /** 178 /**
184 * @brief Sets the path to the model 179 * @brief Sets the path to the model
185 * @param path New path to use 180 * @param path New path to use
186 */ 181 */
187 void updateHeaderNameField(Model& model, const QString &name) 182 void updateHeaderNameField(QTextDocument& model, const QString &name)
188 { 183 {
189 #if 0 184 #if 0
190 // Update the "Name: 1234.dat" comment 185 // Update the "Name: 1234.dat" comment
191 if (model.size() >= 2) { 186 if (model.size() >= 2) {
192 if (const Comment* nameObject = std::get_if<Comment>(&model[1])) { 187 if (const Comment* nameObject = std::get_if<Comment>(&model[1])) {

mercurial