} // namespace anon
-FileName Buffer::getAutosaveFilename() const
+FileName Buffer::getAutosaveFileName() const
{
// if the document is unnamed try to save in the backup dir, else
// in the default document path, and as a last try in the filePath,
void Buffer::removeAutosaveFile() const
{
- FileName const f = getAutosaveFilename();
+ FileName const f = getAutosaveFileName();
if (f.exists())
f.removeFile();
}
void Buffer::moveAutosaveFile(support::FileName const & oldauto) const
{
- FileName const newauto = getAutosaveFilename();
+ FileName const newauto = getAutosaveFileName();
oldauto.refresh();
if (newauto != oldauto && oldauto.exists())
if (!oldauto.moveTo(newauto))
// emit message signal.
message(_("Autosaving current document..."));
- AutoSaveBuffer autosave(*this, getAutosaveFilename());
+ AutoSaveBuffer autosave(*this, getAutosaveFileName());
autosave.start();
d->bak_clean = true;
///
void moveAutosaveFile(support::FileName const & old) const;
///
- support::FileName getAutosaveFilename() const;
+ support::FileName getAutosaveFileName() const;
/// return the format of the buffer on a string
std::string bufferFormat() const;
#if (QT_VERSION >= 0x040400)
GuiViewPrivate::busyBuffers.insert(buffer);
QFuture<docstring> f = QtConcurrent::run(GuiViewPrivate::saveAndDestroy, buffer, buffer->clone(),
- buffer->getAutosaveFilename());
+ buffer->getAutosaveFileName());
d.autosave_watcher_.setFuture(f);
#else
buffer->autoSave();
}
}
- FileName oldauto = b.getAutosaveFilename();
+ FileName oldauto = b.getAutosaveFileName();
// Ok, change the name of the buffer
b.setFileName(fname.absFileName());
b.moveAutosaveFile(oldauto);
if (!saveBuffer(b)) {
- oldauto = b.getAutosaveFilename();
+ oldauto = b.getAutosaveFileName();
b.setFileName(oldname.absFileName());
b.setUnnamed(unnamed);
b.saveCheckSum(oldname);