Ref T199, also cache files can be loaded

* unwrap cache JSON object
* parameter to control if cache format is allowed
This commit is contained in:
Klaus Basan
2018-01-13 00:29:39 +01:00
parent 922f12f141
commit 312d01d35b
4 changed files with 57 additions and 17 deletions

View File

@@ -215,10 +215,10 @@ namespace BlackCore
return url;
}
CGlobalSetup CGlobalSetup::fromJsonFile(const QString &fileNameAndPath)
CGlobalSetup CGlobalSetup::fromJsonFile(const QString &fileNameAndPath, bool acceptCacheFormat)
{
CGlobalSetup setup;
loadFromJsonFile(setup, fileNameAndPath);
loadFromJsonFile(setup, fileNameAndPath, acceptCacheFormat);
return setup;
}

View File

@@ -211,7 +211,7 @@ namespace BlackCore
static BlackMisc::Network::CUrl buildDbDataDirectoryUrl(const BlackMisc::Network::CUrl &candidate);
//! Object initialized by JSON file
static CGlobalSetup fromJsonFile(const QString &fileNameAndPath);
static CGlobalSetup fromJsonFile(const QString &fileNameAndPath, bool acceptCacheFormat);
private:
bool m_wasLoaded = false; //!< Loaded from web