16 for (
auto it =
cbegin(); it !=
cend(); ++it) { json.insert(it.key(), it.value().toJson()); }
30 for (
auto it = json.begin(); it != json.end(); ++it)
32 const QString
key = it.key();
47 if (
value.isUndefined()) {
continue; }
58 for (
auto it =
cbegin(); it !=
cend(); ++it) { json.insert(it.key(), it.value().toMemoizedJson()); }
72 for (
auto it = json.begin(); it != json.end(); ++it)
74 const QString
key = it.key();
89 if (
value.isUndefined()) {
continue; }
99 const QString &prefix)
103 for (
auto it = json.begin(); it != json.end(); ++it)
105 const QString
key = it.key();
124 if (
value.isUndefined()) {
continue; }
129 if (message.isSuccess()) {
insert(
key, var); }
137 const QString &prefix)
141 for (
auto it = json.begin(); it != json.end(); ++it)
143 const QString
key = it.key();
156 const QString &prefix)
163 if (
value.isUndefined()) {
continue; }
168 if (message.isSuccess()) {
insert(
key, var); }
void clear()
Removes all items from the dictionary.
const CVariant value(const QString &key) const
Returns the value associated with the key.
auto keys() const
Return a range of all keys (does not allocate a temporary container)
const_iterator cbegin() const
Returns const iterator at the beginning of the dictionary.
iterator insert(const QString &key, const CVariant &value)
Insert new item with key and value.
friend impl_type & implementationOf(CDictionary &dict)
Return reference to the internal implementation object.
const QString key(const CVariant &value) const
Return key assigned to value.
const_iterator cend() const
Returns const iterator at the end of the dictionary.
Pseudo-RAII pattern that tracks the current JSON value being converted.
A sequence of log categories.
void push_back(const T &value)
Appends an element at the end of the sequence.
Status messages, e.g. from Core -> GUI.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
CStatusMessage convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromMemoizedJson, catch any CJsonException that is thrown and return it as CStatusMessage...
T value() const
Return the value converted to the type T.
void convertFromMemoizedJson(const QJsonObject &json, bool allowFallbackToJson)
From compact JSON format.
void convertFromJson(const QJsonObject &json)
Assign from JSON object.
CStatusMessage convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
void convertFromJson(const QJsonObject &json)
Assign from JSON object.
QJsonObject & mergeToMemoizedJson(QJsonObject &json) const
Insert values from this map into an existing compact JSON object.
CStatusMessageList convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromMemoizedJson, catch any CJsonException that are thrown and return them as CStatusMess...
void convertFromMemoizedJson(const QJsonObject &json)
From compact JSON format.
QJsonObject toMemoizedJson() const
To compact JSON format.
QJsonObject toJson() const
Cast to JSON object.
QJsonObject & mergeToJson(QJsonObject &json) const
Insert values from this map into an existing JSON object.
CStatusMessageList convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromJson, catch any CJsonException that are thrown and return them as CStatusMessage.
Free functions in swift::misc.