mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-08 22:42:34 -04:00
Implemented major autoreload functionality
* Ignore autoreload on save / save-as * Consolidated db save code * Corrected bug (crash) in merge entry code due to not cloning the entry * Enhanced known modified status of database * Implemented test cases for autoreload
This commit is contained in:
parent
20c3ca7d37
commit
7fb33653ad
9 changed files with 190 additions and 55 deletions
|
@ -92,13 +92,14 @@ public:
|
|||
EntryView* entryView();
|
||||
void showUnlockDialog();
|
||||
void closeUnlockDialog();
|
||||
void ignoreNextAutoreload();
|
||||
|
||||
Q_SIGNALS:
|
||||
void closeRequest();
|
||||
void currentModeChanged(DatabaseWidget::Mode mode);
|
||||
void groupChanged();
|
||||
void entrySelectionChanged();
|
||||
void databaseChanged(Database* newDb);
|
||||
void databaseChanged(Database* newDb, bool unsavedChanges);
|
||||
void databaseMerged(Database* mergedDb);
|
||||
void groupContextMenuRequested(const QPoint& globalPos);
|
||||
void entryContextMenuRequested(const QPoint& globalPos);
|
||||
|
@ -136,6 +137,8 @@ public Q_SLOTS:
|
|||
void switchToOpenMergeDatabase(const QString& fileName);
|
||||
void switchToOpenMergeDatabase(const QString& fileName, const QString& password, const QString& keyFile);
|
||||
void switchToImportKeepass1(const QString& fileName);
|
||||
void databaseModified();
|
||||
void databaseSaved();
|
||||
// Search related slots
|
||||
void search(const QString& searchtext);
|
||||
void setSearchCaseSensitive(bool state);
|
||||
|
@ -194,8 +197,12 @@ private:
|
|||
bool m_searchCaseSensitive;
|
||||
bool m_searchCurrentGroup;
|
||||
|
||||
// Autoreload
|
||||
QFileSystemWatcher m_fileWatcher;
|
||||
QTimer m_fileWatchTimer;
|
||||
bool m_ignoreNextAutoreload;
|
||||
QTimer m_ignoreWatchTimer;
|
||||
bool m_databaseModified;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_DATABASEWIDGET_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue