diff --git a/src/blackcore/datacache.cpp b/src/blackmisc/datacache.cpp similarity index 98% rename from src/blackcore/datacache.cpp rename to src/blackmisc/datacache.cpp index 45a2c4d9c..32a7af612 100644 --- a/src/blackcore/datacache.cpp +++ b/src/blackmisc/datacache.cpp @@ -13,13 +13,10 @@ #include #include -using namespace BlackMisc; - -namespace BlackCore +namespace BlackMisc { - CDataCache::CDataCache() : - CValueCache(CValueCache::LocalOnly) + CValueCache(CValueCache::LocalOnly) // for signal loopback { if (! QDir::root().mkpath(persistentStore())) { @@ -170,5 +167,4 @@ namespace BlackCore m_deferredChanges.clear(); } } - } diff --git a/src/blackcore/datacache.h b/src/blackmisc/datacache.h similarity index 94% rename from src/blackcore/datacache.h rename to src/blackmisc/datacache.h index cb8cf6648..65cef9203 100644 --- a/src/blackcore/datacache.h +++ b/src/blackmisc/datacache.h @@ -9,25 +9,24 @@ //! \file -#ifndef BLACKCORE_DATACACHE_H -#define BLACKCORE_DATACACHE_H +#ifndef BLACKMISC_DATACACHE_H +#define BLACKMISC_DATACACHE_H -#include "blackcore/blackcoreexport.h" +#include "blackmisc/blackmiscexport.h" #include "blackmisc/valuecache.h" #include "blackmisc/worker.h" #include #include -namespace BlackCore +namespace BlackMisc { - class CDataCache; /*! * Worker which performs (de)serialization on behalf of CDataCache, in a separate thread * so that the main thread is not blocked by (de)serialization of large objects. */ - class BLACKCORE_EXPORT CDataCacheSerializer : public BlackMisc::CContinuousWorker + class BLACKMISC_EXPORT CDataCacheSerializer : public BlackMisc::CContinuousWorker { Q_OBJECT @@ -63,7 +62,7 @@ namespace BlackCore * * File-based distribution between processes is built-in to the class. */ - class BLACKCORE_EXPORT CDataCache : public BlackMisc::CValueCache + class BLACKMISC_EXPORT CDataCache : public BlackMisc::CValueCache { Q_OBJECT @@ -95,7 +94,7 @@ namespace BlackCore /*! * Class template for accessing a specific value in the CDataCache. - * \tparam Trait A subclass of BlackCore::CDataTrait that identifies the value's key and other metadata. + * \tparam Trait A subclass of BlackMisc::CDataTrait that identifies the value's key and other metadata. */ template class CData : public BlackMisc::CCached @@ -122,7 +121,7 @@ namespace BlackCore }; /*! - * Base class for traits to be used as template argument to BlackCore::CData. + * Base class for traits to be used as template argument to BlackMisc::CData. */ template struct CDataTrait @@ -150,7 +149,6 @@ namespace BlackCore //! Deleted copy assignment operator. CDataTrait &operator =(const CDataTrait &) = delete; }; - } #endif diff --git a/src/blackcore/settingscache.cpp b/src/blackmisc/settingscache.cpp similarity index 98% rename from src/blackcore/settingscache.cpp rename to src/blackmisc/settingscache.cpp index f399063fa..fab728229 100644 --- a/src/blackcore/settingscache.cpp +++ b/src/blackmisc/settingscache.cpp @@ -10,9 +10,8 @@ #include "settingscache.h" #include -namespace BlackCore +namespace BlackMisc { - CSettingsCache::CSettingsCache() : CValueCache(CValueCache::Distributed) {} @@ -48,5 +47,4 @@ namespace BlackCore { return enumerateFiles(persistentStore()); } - } diff --git a/src/blackcore/settingscache.h b/src/blackmisc/settingscache.h similarity index 93% rename from src/blackcore/settingscache.h rename to src/blackmisc/settingscache.h index 165cd078c..1aa86aeb3 100644 --- a/src/blackcore/settingscache.h +++ b/src/blackmisc/settingscache.h @@ -9,19 +9,18 @@ //! \file -#ifndef BLACKCORE_SETTINGSCACHE_H -#define BLACKCORE_SETTINGSCACHE_H +#ifndef BLACKMISC_SETTINGSCACHE_H +#define BLACKMISC_SETTINGSCACHE_H -#include "blackcore/blackcoreexport.h" +#include "blackmisc/blackmiscexport.h" #include "blackmisc/valuecache.h" -namespace BlackCore +namespace BlackMisc { - /*! * Singleton derived class of CValueCache, for core settings. */ - class BLACKCORE_EXPORT CSettingsCache : public BlackMisc::CValueCache + class BLACKMISC_EXPORT CSettingsCache : public BlackMisc::CValueCache { Q_OBJECT @@ -50,7 +49,7 @@ namespace BlackCore /*! * Class template for accessing a specific value in the CSettingsCache. - * \tparam Trait A subclass of BlackCore::CSettingTrait that identifies the value's key and other metadata. + * \tparam Trait A subclass of BlackMisc::CSettingTrait that identifies the value's key and other metadata. */ template class CSetting : public BlackMisc::CCached @@ -77,7 +76,7 @@ namespace BlackCore }; /*! - * Base class for traits to be used as template argument to BlackCore::CSetting. + * Base class for traits to be used as template argument to BlackMisc::CSetting. */ template struct CSettingTrait @@ -105,7 +104,6 @@ namespace BlackCore //! Deleted copy assignment operator. CSettingTrait &operator =(const CSettingTrait &) = delete; }; - } #endif