mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #695 Allow to set a mock root directory for caches, for unit tests.
This commit is contained in:
@@ -48,6 +48,13 @@ namespace BlackMisc
|
||||
{
|
||||
class CLogCategoryList;
|
||||
|
||||
/*!
|
||||
* Overwrite the default root directory for cache and settings, for testing purposes.
|
||||
*
|
||||
* May not be called after any cache or settings objects have been constructed.
|
||||
*/
|
||||
BLACKMISC_EXPORT void setMockCacheRootDirectory(const QString &path);
|
||||
|
||||
/*!
|
||||
* Value class used for signalling changed values in the cache.
|
||||
*/
|
||||
@@ -280,6 +287,9 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
qint64 getTimestampSync(const QString &key) { return std::get<1>(getValue(key)); }
|
||||
|
||||
//! \private
|
||||
static const QString &getCacheRootDirectory();
|
||||
|
||||
private:
|
||||
friend class Private::CValuePage;
|
||||
struct Element;
|
||||
|
||||
Reference in New Issue
Block a user