Ref T267, allow to call "convertFromMemoizedJson", but also convert via "convertFromJson"

The variant convertFromMemoizedJson trait did already do something similar, calling "convertFromJson" if the memoized version is not avilable. Now the function also "decides" based on the passed data itself.
This commit is contained in:
Klaus Basan
2018-05-15 02:53:35 +02:00
parent 98bc0a7d6e
commit 50a625d2bc
6 changed files with 37 additions and 19 deletions

View File

@@ -286,7 +286,7 @@ namespace BlackMisc
QJsonObject toMemoizedJson() const;
//! From compact JSON format.
void convertFromMemoizedJson(const QJsonObject &json);
void convertFromMemoizedJson(const QJsonObject &json, bool allowFallbackToJson);
//! Call convertFromMemoizedJson, catch any CJsonException that is thrown and return it as CStatusMessage.
CStatusMessage convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix);