refs #906, obtain .rev file name from static function instead of member

This commit is contained in:
Klaus Basan
2017-03-15 18:05:06 +01:00
committed by Mathew Sutcliffe
parent 31a01d74c6
commit ecb7877908
2 changed files with 13 additions and 5 deletions

View File

@@ -255,6 +255,9 @@ namespace BlackMisc
//! The directory where core data are stored.
static const QString &persistentStore();
//! Revision file name
static const QString &revisionFileName();
//! Return the filename where the value with the given key may be stored.
static QString filenameForKey(const QString &key);
@@ -297,9 +300,8 @@ namespace BlackMisc
virtual void connectPage(Private::CValuePage *page) override;
QFileSystemWatcher m_watcher;
const QString m_revisionFileName { CFileUtils::appendFilePaths(persistentStore(), ".rev") };
CDataCacheSerializer m_serializer { this, m_revisionFileName };
CDataCacheSerializer m_serializer { this, revisionFileName() };
CDataCacheRevision m_revision { persistentStore() + "/" };
friend class CDataCacheSerializer; // to access m_revision and protected members of CValueCache
};