Correct multiple issues with database saving
* Mark the database as clean after fully completing the file save operation INSTEAD of when merely writing the database to a file. * Stop the modified timer when marking the database as clean, this prevents latent erroneous modified signals from being emitted. * Do not restart the modified timer after a new change is detected while it is still running.
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QScopedPointer>
|
||||
#include <QTimer>
|
||||
|
||||
#include "config-keepassx.h"
|
||||
#include "crypto/kdf/AesKdf.h"
|
||||
@@ -37,7 +37,6 @@ enum class EntryReferenceType;
|
||||
class FileWatcher;
|
||||
class Group;
|
||||
class Metadata;
|
||||
class QTimer;
|
||||
class QIODevice;
|
||||
|
||||
struct DeletedObject
|
||||
@@ -155,9 +154,6 @@ signals:
|
||||
void databaseDiscarded();
|
||||
void databaseFileChanged();
|
||||
|
||||
private slots:
|
||||
void startModifiedTimer();
|
||||
|
||||
private:
|
||||
struct DatabaseData
|
||||
{
|
||||
@@ -211,7 +207,7 @@ private:
|
||||
DatabaseData m_data;
|
||||
QPointer<Group> m_rootGroup;
|
||||
QList<DeletedObject> m_deletedObjects;
|
||||
QPointer<QTimer> m_timer;
|
||||
QTimer m_modifiedTimer;
|
||||
QPointer<FileWatcher> m_fileWatcher;
|
||||
bool m_initialized = false;
|
||||
bool m_modified = false;
|
||||
|
||||
Reference in New Issue
Block a user