After 3 failed saves, offer to disable safe saves

* User is prompted to disable safe saves after three failed attempts
* Completely retooled basic settings to group settings logically
* Added setting for "atomic saves"
This commit is contained in:
Jonathan White 2018-01-17 20:13:13 -05:00
parent d7f408e455
commit 3db9a86a4c
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
7 changed files with 384 additions and 291 deletions

View file

@ -32,6 +32,7 @@ enum class EntryReferenceType;
class Group;
class Metadata;
class QTimer;
class QIODevice;
struct DeletedObject
{
@ -111,7 +112,7 @@ public:
void emptyRecycleBin();
void setEmitModified(bool value);
void merge(const Database* other);
QString saveToFile(QString filePath, bool keepOld = false);
QString saveToFile(QString filePath, bool atomic = true, bool backup = false);
/**
* Returns a unique id that is only valid as long as the Database exists.
@ -144,6 +145,8 @@ private:
Group* findGroupRecursive(const Uuid& uuid, Group* group);
void createRecycleBin();
QString writeDatabase(QIODevice* device);
bool backupDatabase(QString filePath);
Metadata* const m_metadata;
Group* m_rootGroup;