refs #494 Use QFileSystemWatcher to watch for remote changes to the data store.

This commit is contained in:
Mathew Sutcliffe
2015-10-18 22:26:23 +01:00
parent 6c8586df23
commit a4dfc4ba9d
2 changed files with 5 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
#include "blackcore/blackcoreexport.h"
#include "blackmisc/valuecache.h"
#include <QUuid>
#include <QTimer>
#include <QFileSystemWatcher>
namespace BlackCore
{
@@ -46,7 +46,7 @@ namespace BlackCore
//! \param defer Whether to defer applying the changes. Used when called by saveToStore.
void loadFromStore(bool lock = true, bool defer = false);
QTimer m_reloadTimer;
QFileSystemWatcher m_watcher;
QUuid m_revision;
const QString m_revisionFileName { persistentStore() + "/.rev" };
BlackMisc::CVariantMap m_deferredChanges;