Ref T237, init/read from JSON files

* multi format compatible (automatically detect format)
* flag if cache values shall be overridden
* init from resource files (those are the files coming with the installer)
* automatically read in background if reader is (already) in its own thread (otherwise cache.set() ASSERT)
This commit is contained in:
Klaus Basan
2018-01-30 06:34:17 +01:00
parent 28b5ec9ec6
commit f3afde76ff
14 changed files with 369 additions and 215 deletions

View File

@@ -445,8 +445,13 @@ namespace BlackCore
//! Write data to disk (mainly for testing scenarios)
bool writeDbDataToDisk(const QString &dir) const;
//! Load DB data from disk (mainly for testing scenarios)
bool readDbDataFromDisk(const QString &dir, bool inBackground);
//! Load DB data from disk (mainly for initial data load and testing scenarios)
//! \remark if the DB readers are alred in aother thread reads in background
bool readDbDataFromDisk(const QString &dir, bool inBackground, bool overrideNewerOnly);
//! Init caches from local DB files
//! \remark the shared files coming with the installer
BlackMisc::CStatusMessageList initDbCachesFromLocalResourceFiles(bool inBackground);
signals:
//! Combined read signal