src/documentmanager.cpp

changeset 262
dc33f8a707c4
parent 259
c27612f0eac0
child 264
76a025db4948
equal deleted inserted replaced
261:6a875faebde2 262:dc33f8a707c4
193 if (info != nullptr) 193 if (info != nullptr)
194 { 194 {
195 QSaveFile file{info->path}; 195 QSaveFile file{info->path};
196 file.setDirectWriteFallback(true); 196 file.setDirectWriteFallback(true);
197 if (file.open(QSaveFile::WriteOnly)) { 197 if (file.open(QSaveFile::WriteOnly)) {
198 ::save(info->model.get(), &file); 198 ::save(*info->model.get(), &file);
199 const bool commitSucceeded = file.commit(); 199 const bool commitSucceeded = file.commit();
200 if (not commitSucceeded) { 200 if (not commitSucceeded) {
201 errors << QObject::tr("Could not save: %1").arg(file.errorString()); 201 errors << QObject::tr("Could not save: %1").arg(file.errorString());
202 return false; 202 return false;
203 } 203 }

mercurial