qWarning() << "VymModel::renameMap failed to release lock for " << oldPath;
vymLock = newLock;
setFilePath(newPath);
+ if (readonly)
+ setReadOnly(false);
return true;
}
qWarning() << "VymModel::renameMap failed to get lockfile. state=" << vymLock.getState();
{
// Check if file on disk has changed meanwhile
if (!filePath.isEmpty()) {
- if (readonly) {
+ if (readonly && vymLock.getState() != VymLock::LockedByMyself) {
// unset readonly if lockfile is gone
+ // but only, if map was LockedByOther before
if (vymLock.tryLock())
setReadOnly(false);
}
else {
- // We could check, if somebody else removed/replaced lockfile
+ // FIXME-5 We could check, if somebody else removed/replaced lockfile
// (A unique vym ID would be needed)
QDateTime tmod = QFileInfo(filePath).lastModified();
return false;
}
+void VymModel::setExportLastCommand(const QString &cmd)
+{
+ settings.setLocalValue(filePath, "/export/last/command", cmd);
+}
+
+void VymModel::setExportLastDescription(const QString &desc)
+{
+ settings.setLocalValue(filePath, "/export/last/description", desc);
+}
+
+void VymModel::setExportLastDestination(const QString &displayedDest)
+{
+ settings.setLocalValue(filePath, "/export/last/displayedDestination", displayedDest);
+}
+
void VymModel::exportLast()
{
QString desc, command,